Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ idmknod(ADM) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

idinstall(ADM)

idmkinit(ADM)

mdevice(F)

sdevice(F)


 idmknod(ADM)                    19 June 1992                    idmknod(ADM)


 Name

    idmknod - remove nodes and read specifications of nodes

 Syntax

    /etc/conf/bin/idmknod -odirectory -i directory -edirectory -s

 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 device's mdevice entry) from /dev.  Ordinary
       files will not be removed.  If the /dev directory contains subdirec-
       tories, 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 speci-
       fication defines a path containing subdirectories, the subdirectories
       will be made automatically.

    +  Returns 0 on success and a positive number on error.

    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 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 Driver Software Packages (DSP).  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  type  minor  [ owner  group  mode ]


         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 sub-
         directories as needed.

         The character ``b'' or ``c''.  A ``b'' indicates that the node is a
         `block' type device and ``c'' indicates `character' type device.

         Minor device number.  This value must be 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(F) 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).

    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'.

    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.

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

 Diagnostics

    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 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(ADM), idmkinit(ADM), mdevice(F), sdevice(F)


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026