Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ putdev(1M) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

devattr(1M)

getdev(1M)






       putdev(1M)                                                putdev(1M)


       NAME
             putdev - create and update the device database

       SYNOPSIS
             putdev -a alias [attribute=value [. . .]]
             putdev -m device attribute=value [attribute=value [. . .]]
             putdev -d device [attribute [. . .]]
             putdev -p device attribute=value[,value . . .]
             putdev -r device attribute=value[,value . . .]

       DESCRIPTION
             The putdev command is used to add a new device to the Device
             Database (DDB), modify an existing device's attributes, or
             remove a device entry from the DDB.  It also allows appending
             new values to attributes that take value-lists (separated by
             commas), and removal of specific values from value-lists.

          Options
             putdev takes the following options:

             -a alias
                   Add a device to the DDB using the specified attributes.
                   The device must be referenced by its alias.

             -m device
                   Modify a device entry in the DDB, using the specified
                   attribute values.  If a specified attribute does not
                   exist in the device entry, putdev adds the specified
                   attribute to the entry.  It also modifies attributes
                   that already have a value with the value specified.

             -d device
                   Remove a device entry from the DDB, when executed
                   without the attributes argument.  If the attribute
                   argument is specified, the attribute and its value are
                   deleted from the device entry.

             -p device
                   Append the list of values to the attribute value-list of
                   the device.  If the value item is multiply defined in
                   the input value-list or already defined in the DDB,
                   putdev fails and prints an error message.

             -r device
                   Remove the list of values from the attribute value-list,
                   of the device.  The command succeeds, even if the value


                           Copyright 1994 Novell, Inc.               Page 1













      putdev(1M)                                                putdev(1M)


                  has been removed or is not defined for the attribute in
                  the DDB.

            alias Define the alias name of the device, a value which must
                  be unique throughout the DDB.  alias is limited to 64
                  characters (DDB_MAXALIAS) and should contain only
                  alphanumeric characters and any of the following special
                  characters: . (period), _ (underscore), $ (dollar sign),
                  and - (hyphen).

            device
                  Designate the absolute pathname or alias name of the
                  device whose attribute is to be added, modified, or
                  removed.  If device is a pathname, then the attributes
                  of the alias to which it maps are updated.

            attribute
                  Designate a device attribute to be added, modified, or
                  deleted.  This prevents an accidental modification or
                  deletion of a device's alias from the DDB.

            value Designate the value to be assigned to a device's
                  attribute.  If any of the values are invalid, then
                  putdev fails and prints an error message.

            Whenever the attributes in a Device Database file are updated,
            the old version of the file is saved to a file with the
            capital letter ``O'' prefixed to the file name.  If there are
            errors in the modification of device attributes, you can
            recover the old versions of the Device Database files.

         Attributes
            Following are all of the attributes which can be defined for a
            device:

            alias The unique name by which a device is known.  No two
                  devices in the database may share the same alias name.
                  The name is limited in length to 64 characters
                  (DDB_MAXALIAS) and should contain only alphanumeric
                  characters and any of the special characters: underscore
                  (_), dollar sign ($), hyphen (-), and period (.).

            bdevice
                  The absolute pathname to the block special device node
                  associated with the device, if any, with maximum length
                  of PATH_MAX.  This attribute is optional.


                          Copyright 1994 Novell, Inc.               Page 2













       putdev(1M)                                                putdev(1M)


             bdevlist
                   A list of additional pathnames of block device special
                   files which map to the same logical or secure device.
                   Each item in the list is separated by a comma, and each
                   must be an absolute pathname of the device special file,
                   with a maximum length of PATH_MAX.  Since, this
                   attribute takes a list of values, putdev -p | -r can be
                   used for this attribute.  This attribute is optional.

             capacity
                   The capacity of the device or of the typical volume, if
                   removable.

             cdevice
                   The absolute pathname to the character special device
                   node associated with the device, if any, with maximum
                   length of PATH_MAX.  This attribute is optional.

             cdevlist
                   It contains a list of additional pathnames of character
                   device special files mapping to the same logical or
                   secure device.  Each item in the list is separated by a
                   comma, and each must be an absolute pathname of the
                   device special file, with a maximum length of PATH_MAX.
                   Since, this attribute takes a list of values, putdev -p
                   | -r can be used for this attribute.  This attribute is
                   optional.

             cyl   Used by the command specified in the mkfscmd attribute.

             desc  A description of any instance of a volume associated
                   with this device (such as floppy diskette).

             dpartlist
                   The list of disk partitions associated with this device.
                   Used only if type=disk.  The list should contain device
                   aliases, each of which must have type=dpart.

             dparttype
                   The type of disk partition represented by this device.
                   Used only if type=dpart.  It should be either fs (for
                   file system) or dp (for data partition).

             erasecmd
                   The command string that, when executed, erases the
                   device.


                           Copyright 1994 Novell, Inc.               Page 3













      putdev(1M)                                                putdev(1M)


            fmtcmd
                  The command string that, when executed, formats the
                  device.

            fsname
                  The file system name on the file system administered on
                  this partition, as supplied to the /usr/sbin/labelit
                  command.  This attribute is specified only if type=dpart
                  and dparttype=fs.

            gap   Used by the command specified in the mkfscmd attribute.

            mkfscmd
                  The command string that, when executed, places a file
                  system on a previously formatted device.

            mountpt
                  The default mount point to use for the device.  Used
                  only if the device is mountable.  For disk partitions
                  where type=dpart and dparttype=fs, this attribute should
                  specify the location where the partition is normally
                  mounted.

            nblocks
                  The number of blocks in the file system administered on
                  this partition.  Used only if type=dpart and
                  dparttype=fs.

            ninodes
                  The number of inodes in the file system administered on
                  this partition.  Used only if type=dpart and
                  dparttype=fs.

            norewind
                  The name of the character special device node that
                  allows access to the serial device without rewinding
                  when the device is closed.

            pathname
                  Defines the pathname to an i-node describing the device
                  (used for non-block or character device pathnames, such
                  as directories).

            type  A token that represents inherent qualities of the
                  device.  Standard types include: 9-track, ctape, disk,
                  directory, diskette, dpart, and qtape.


                          Copyright 1994 Novell, Inc.               Page 4













       putdev(1M)                                                putdev(1M)


             volname
                   The volume name on the file system administered on this
                   partition, as supplied to the /usr/sbin/labelit command.
                   Used only if type=dpart and dparttype=fs.

             volume
                   A text string used to describe any instance of a volume
                   associated with this device.  This attribute should not
                   be defined for devices which are not removable.

          Files
             /etc/device.tab

          Exit Codes
             If putdev is successful, it returns an exit code of 0.
             Otherwise, it returns one of the following exit codes and
             prints the corresponding error message:

             1     incorrect usage
                   USAGE: putdev -a alias [attribute=value] . . .

             2     Device Database in inconsistent state - notify
                   administrator

             2     Device Database could not be accessed or created

             3     alias already exists in Device Database

             3     device does not exist in Device Database

             ?     "dsf" already exists in Device Database

             6     invalid alias or invalid pathname "device"

             4     hilevel does not dominate lolevel in attribute range

             4     invalid value for attribute "attr"
                         level= "level" not defined in LTDB

             6     invalid value for attribute "attr"
                         user/uid= "uid" not defined in system

             6     invalid value for attribute "attr"
                         group/gid= "group" not defined in system




                           Copyright 1994 Novell, Inc.               Page 5













      putdev(1M)                                                putdev(1M)


            6     invalid value for attribute "attr"
                        invalid permissions specified "perm"

            6     invalid value for attribute "attr"
                        invalid delimiter specified in "value"

            6     "value" multiply defined for attribute "attr"

            6     Device Database in use.  Try again later.

            3     "alias" not defined in Device Database

            5     system service not installed

      REFERENCES
            devattr(1M), getdev(1M)
































                          Copyright 1994 Novell, Inc.               Page 6








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