idmknod(1M) UNIX System V(Base System) idmknod(1M)
NAME
idmknod - removes nodes and reads specifications of nodes
SYNOPSIS
idmknod [options]
DESCRIPTION
This command performs the following functions:
Removes the nodes for non-required devices (those that do not have
an r in field 3 of the the device's mdevice entry) from /dev.
Ordinary files will not be removed. If the /dev directory contains
subdirectories, those subdirectories will be traversed and nodes
found for non-required devices will be removed as well. If empty
subdirectories result due to the removal of nodes, the
subdirectories are then removed.
Reads the specifications of nodes given in the files contained in
/etc/conf/node.d and installs these nodes in /dev. If the node
specification defines a path containing subdirectories, the
subdirectories will be made automatically.
Returns 0 on success and a positive number on error.
The idmknod command is run automatically upon entering init state 2 on
the next system reboot after a kernel reconfiguration to establish the
correct representation of device nodes in the /dev directory for the
running /unix kernel. idmknod can be called as a user level command to
test modification of the /dev directory before a Driver Software Package
(DSP) 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 I. Node modules installed
by device DSPs. There is at most one file per DSP. Each file contains
one line for each node that is to be installed. The format of each line
is:
Name of device entry (field 1) 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.
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 can be a path relative to /dev ,
and idmknod will create subdirectories as needed.
The character b or c.
A b indicates that the node is a 'block' type device and c indicates
'character' type device.
For devices having multiple major numbers, the following scheme is used
to specify which device nodes belong to which major. The third field
is expanded to specify a major number offset as follows:
10/89 Page 1
idmknod(1M) UNIX System V(Base System) idmknod(1M)
"[b/c]: maj_off", where [b/c] refers to either block or character major
and maj_off refers to an offset number within the major number range in
the mdevice file. For example a specification "C:2" refers to a
character major offset 2, which for a major range of "15-18" would
translate to character major 17.
Minor device number.
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 [see mknod(2) in the
Programmer's Reference Manual for information on minor device number
values].
User id.
The integer value in this field describes the ownership of the node to
be made.
Group id.
The integer value in this field describes the group ownership of the
node to be created.
Permission.
The value expected must be in octal form, in the manner in which
permissions are described to the chmod(1) command (i.e. 0777).
Some example node file entries are as follows:
asy tty00 c 1
makes /dev/tty00 for device asy using minor device 1.
qt rmt/c0s0 c 4
makes /dev/rmt/c0s0 for device qt using minor device 4.
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.
scsi tty1 C:0 5
makes tty1 for device scsi using minor device 1 major_number
offset 0.
The command line options are:
-o directory Nodes will be installed in the directory specified rather
than /dev.
-i directory The file mdevice which normally resides in /etc/conf/cf.d
, can be found in the directory specified.
-e directory The Node modules that normally reside in /etc/conf/node.d
can be found in the directory specified.
Page 2 10/89
idmknod(1M) UNIX System V(Base System) idmknod(1M)
-s Suppress removing nodes (just add new nodes).
ERROR MESSAGES
An exit value of zero indicates success. If an error was encountered due
to a syntax or format error in a node entry, an advisory message will be
printed to stdout and the command will continue. If a serious error is
encountered (i.e., a required
file cannot be found), idmknod will exit with a non-zero value and
report an error message. All error messages are designed to be self-
explanatory.
SEE ALSO
idinstall(1m), idmkinit(1m).
mdevice(4), mknod(2), sdevice(4) in the Programmer's Reference Manual.
10/89 Page 3