Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mkdev(4) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

pdimkdev(1M)






       mkdev(4)                                                    mkdev(4)


       NAME
             mkdev - file format for the pdimkdev utility

       DESCRIPTION
             The pdimkdev utility is executed when the system transitions
             from single-user to multi-user mode to create special device
             file entries for any newly configured PDI peripheral hardware.
             The pdimkdev utility allows for provision of special device
             file naming conventions by the application.

             The naming convention for a PDI peripheral device is described
             in a mkdev template file.  Additional mkdev template files may
             be provided for new device types that require a different
             naming convention than the one already being used.

          Template File Overview
             Each device type has a corresponding template file that is, by
             convention, placed in the directory /etc/scsi/mkdev.d.  The
             template file allows for special device files to be created in
             up to four directories.  These are the character and block
             special directories and the corresponding simple
             administration directories.  The permissions of the special
             device files may also be specified.

          Device Naming Template Syntax
             The following tables show the syntax for the mkdev template
             files.  The lines up to the separator ``DATA'' are for user
             messages that may be device specific.
                    _______________________________________________
                   | STRING |                MEANING              |
                   |________|_____________________________________|
                   |  QUERY |  If the QUERY string in the template|
                   |        |  file is a string other than ``-'', |
                   |        |  then the query will be issued to   |
                   |        |  the user under low inode           |
                   |        |  conditions.  The set of device     |
                   |        |  files to be created will be        |
                   |        |  determined based on the response.  |
                   |        |  The only currently known           |
                   |        |  application for this feature is to |
                   |        |  determine whether a disk device is |
                   |        |  a boot device.                     |
                   |________|_____________________________________|
                   |        |                                     |
                   |________|_____________________________________|



                           Copyright 1994 Novell, Inc.               Page 1













      mkdev(4)                                                    mkdev(4)


                  | POSTMSG|  The POSTMSG string is printed after|
                  |        |  the naming of a new device.  For   |
                  |        |  SCSI tape devices, this message is |
                  |        |  ``-'', which mkdev ignores.  For   |
                  |        |  disk devices, the message instructs|
                  |        |  the user to use sysadm partitioning|
                  |        |  if necessary.                      |
                  |________|_____________________________________|

            The next line provides the directory names for the block and
            character devices as well as the simple administration
            equivalents for these.  On the remaining lines the first three
            fields provide the key, minor number and mode.  The fourth and
            fifth fields provide, respectively, the block and character
            device files.  The sixth and seventh fields provide the block
            and character simple administration names, which are linked to
            the files in fields four and five, respectively.  Below is a
            key showing the use and meaning of characters and keywords in
            the templates that follow.
                     ___________________________________________
                    | KEY|  The key field is a single character|
                    |    |  from the set ``-'', ``M'', or      |
                    |    |  ``Y''.  The meanings are explained |
                    |    |  below.                             |
                    |____|_____________________________________|
                    |  Y |  Under low inode conditions (less   |
                    |    |  than 200 available in the root     |
                    |    |  filesystem) these device files will|
                    |    |  be created if answer to QUERY is   |
                    |    |  ``yes''.  For disks, this will     |
                    |    |  denote Logical Unit (LU) is        |
                    |    |  bootable and files must be created |
                    |    |  for a bootable LU.                 |
                    |____|_____________________________________|
                    |  M |  Device file is mandatory and is    |
                    |    |  created in low inode conditions.   |
                    |____|_____________________________________|
                    |  - |  Special device file is to be       |
                    |    |  created under normal situations    |
                    |    |  (that is, more than 200 available  |
                    |    |  inodes on the root filesystem).    |
                    |____|_____________________________________|

         Minor Number Calculation
            The information available to the pdimkdev utility about each
            device is host adaptor slot number (C), target controller


                          Copyright 1994 Novell, Inc.               Page 2













       mkdev(4)                                                    mkdev(4)


             number (T), Logical Unit number (L), and major number.  A
             formula, using the information available to the pdimkdev
             utility, is provided in the template file and is used to
             generate the minor number.  The major and minor number are
             used in calls to mknod(2) to create the special device file.
                     ______________________________________________
                    | STRING|                MEANING              |
                    |_______|_____________________________________|
                    | MINOR |  : [constant| C| T| L] [+| x| *]    |
                    |       |  MINOR The minor field is a string  |
                    |       |  that may contain any of the        |
                    |       |  characters 'C', 'T', or 'L'.  When |
                    |       |  calculating the minor number, the  |
                    |       |  values for these variables are     |
                    |       |  substituted in the expression given|
                    |       |  in the string.  The expression for |
                    |       |  the minor number is evaluated right|
                    |       |  to left.  (For example, 3+L*16 is  |
                    |       |  19 when L=1)                       |
                    |_______|_____________________________________|
                    |   C   |  Host adaptor slot number.          |
                    |_______|_____________________________________|
                    |   T   |  Target controller SCSI ID.         |
                    |_______|_____________________________________|
                    |   L   |  Logical Unit number.               |
                    |_______|_____________________________________|

       REFERENCES
             pdimkdev(1M)



















                           Copyright 1994 Novell, Inc.               Page 3








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