gtpo1m62Operations

ZFILE mknod-Create a New Character Special File

Use this command to create a new character special file. Character special files allow you to access devices and other sources of data by defining device drivers and using the file system functions.

Requirements and Restrictions

Format




path
is the path name of the new character special file.

c
indicates the special file is a character-oriented device.

major
is the major device number for the new character special file. The major device number specifies the device driver that the file system is to use for the character special file. Specify this parameter in the same way as a C language integer constant in octal, hexadecimal, or decimal format as follows:

Major device numbers must be in the range 0-65535 (decimal), 0-0xFFFF (hexadecimal), or 0-0177777 (octal). Major device numbers from 32768 (0x8000, 0100000) to 65535 (0xFFFF, 0177777) are reserved for IBM use. Major device number 32768 (0x8000, 0100000) is reserved for regular files and cannot be used for character special files.

minor
is the minor device number for the new character special file. The minor device number provides information about the character special file to the device driver. The minor device number is meaningful only to the device driver that corresponds to the major device number. Specify this parameter in the same way as the major parameter. Minor device numbers must be in the range 0-65535 (decimal), 0-0xFFFF (hexadecimal), or 0-0177777 (octal).

Additional Information

Examples

In the following example, a new character special file named /dev/my.device is created with major device number 2 and minor device number 0.

+---------------------------------------------------------------------------------------------+
|User:   zfile mknod /dev/my.device c 2 0                                                     |
|                                                                                             |
|System: FILE0003I 15.19.34 mknod /dev/... COMPLETED SUCCESSFULLY. NO OUTPUT TO DISPLAY       |
+---------------------------------------------------------------------------------------------+

Related Information