DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

idmknod(ADM)


idmknod -- remove nodes and read specifications of nodes

Syntax

/etc/conf/bin/idmknod [-s] [-G nodelist] [-i mdevdir] [-o devdir] [-e nodedir] [-l symdir]

Description

This command performs the following functions: idmknod is run automatically when idbuild(ADM) installs a newly built kernel as /unix. idmknod can be called as a user level command to test modification of the /dev directory before a DSP (Driver Software Package) is actually built. It is also useful in installation scripts that do not reconfigure the kernel, but need to create /dev entries.

The files in /etc/conf/node.d are copies of the Node modules installed by device DSPs. There should be at most one file per DSP. Each file contains one line for each node that is to be installed. The line has the following format if the node is a block or character special device:

name newnode type minor [ owner group mode ]

If the node is a hard link or a symbolic link, the format is:

name newnode type oldnode

The fields are defined as follows:


name
Name of device entry in the mdevice file (The mdevice entry will be the line installed by the DSP from its Master module). This field must be from 1 to 8 characters in length. The first character must be a letter. The others may be letters, digits, or underscores.

newnode
Name of node to be inserted in /dev. The first character must be a letter. The others may be letters, digits, or underscores. This field is a path relative to /dev, and idmknod will create subdirectories as needed.

type
The file type as indicated by one of the following characters (this determines the format of the line):

b
newnode is a block special file.

c
newnode is a character special file.

l
newnode is a link.

s
newnode is a symbolic link.

minor
Minor device number. This must be a decimal value between 0 and 255, except for drivers that have duplicate entries with the ``M'' characteristic in mdevice(F). In such a case, the upper limit is determined by adding 255 to the maximum OFFSET value defined in mdevice for the particular driver; that is, upper limit = 255 + maximum OFFSET. If this field is a non-numeric, it is assumed to be a request for a streams clone device node, and idmknod will set the minor number to the value of the major number of the device specified.

owner
(Optional field.) Contains the name of the owner of the device node.

group
(Optional field.) Contains the name of the group to which the device node belongs.

mode
(Optional field.) Contains the mode of the device node, as an octal number (see chmod(C) for details).

oldnode
The name of another node in /dev to which newnode is to be linked. If a hard link is required (type is l) then oldnode must already exist (it should be listed earlier in the file).
The command line options to idmknod are:

-e nodedir
The Node modules that normally reside in /etc/conf/node.d can be found in the directory nodedir.

-G nodelist
Output a list of device names, device types, and device numbers to the file specified by nodelist. This option implies that the -s option is specified.

-i mdevdir
The file mdevice that normally resides in /etc/conf/cf.d can be found in the directory mdevdir.

-l symdir
The oldmode for a symbolic link (type is s) is relative to directory symdir rather than /dev.

-o devdir
Nodes will be installed in the directory devdir rather than /dev.

-s
Suppress removing nodes (just add new nodes).

Exit values

An exit value of zero indicates success. If an error was encountered due to a syntax or format error in a nodes entry, an advisory message is printed to the standard error output and the command continues. If a serious error is encountered (that is, a required file cannot be found), idmknod exits with a non-zero value after reporting an error message. The error messages should be self-explanatory.

Examples

Some example node file entries:

asy tty00 c 1
makes /dev/tty00 for character device asy using minor device 1.

qt rmt/c0s0 c 4
makes /dev/rmt/c0s0 for character device qt using minor device 4.

qt rqt0 l rmt/c0s0
creates a link named /dev/rqt0 to /dev/rmt/c0s0 for device qt.

clone net/nau/clone c nau
makes /dev/net/nau/clone for device clone. The minor device number is set to the major device number of device nau.

See also

idinstall(ADM), idmkinit(ADM), mdevice(F), sdevice(F)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003