*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> rmsf (1m)              
Title
Content
Arch
Section
 

Contents


 rmsf(1M)                                                           rmsf(1M)




 NAME    [Toc]    [Back]
      rmsf - remove a special (device) file

 SYNOPSIS    [Toc]    [Back]
      /sbin/rmsf [-a|-k] [-D directory] [-q|-v] special_file ...

      /sbin/rmsf [-C class | -d driver] [-D directory] -H hw_path [-k]
           [-q|-v]

 DESCRIPTION    [Toc]    [Back]
      The rmsf command removes one or more special files from the /dev
      directory and potentially removes information about the associated
      device or devices with H/W type "DEVICE" (see ioscan(1M)) from the
      system.

      If no options are specified, rmsf removes only the special_files
      specified on the command line.  The -k option causes rmsf to remove
      the definition of the device from the system without removing any
      special files.  The -a option causes rmsf to remove the device
      definition, and all special files that map to it from the /dev
      directory (or the directory specified with the -D option).  By
      default, rmsf only removes special_file as given on the command line,
      however, when the -a option is used and special_file is an absolute
      path name special_file will be removed even if it does not reside in
      the /dev directory (or the directory specified with the -D option).
      Note that if special_file belongs to a node for which H/W type is not
      "DEVICE", the device definition will not be removed from the system
      and the special_file will be removed if it is a leaf node.

      If a -H hw_path is specified, special files are removed as follows:

           +  If hw_path belongs to a node with H/W type "DEVICE," all
              special files mapping to devices at that hardware path and the
              system definition of those devices are removed.

           +  If hw_path belongs to a node for which H/W type is not
              "DEVICE," then, a special file is removed as follows:

              +    If it is a leaf node, only special files for that node
                   will be removed.

              +    If the node has children, then a warning message will be
                   issued and system definition of all the children devices
                   and their special files are removed.

      The -C and -d options remove only those special files that are
      associated with the given device driver or that belong to the given
      device class, respectively.  This is useful when there is more than
      one type of special file mapped to a single hardware path.





 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003






 rmsf(1M)                                                           rmsf(1M)




      If the -k option is specified, the definition of all devices at that
      hardware path are removed from the system, again without removing any
      special files.

      Normally, rmsf displays a message as the special files are deleted for
      each driver.  The -q (quiet) option suppresses the deletion message.
      The -v (verbose) option displays the deletion message and the name of
      each special file as it is deleted.

      Note that most drivers do not support the ability to be removed from
      the system.

      If the device being removed from the system uses a dynamically
      assigned major number, that number will be freed up for future
      allocation.

    Options    [Toc]    [Back]
      rmsf recognizes the following options:

           -a             Remove the definition of the device from the
                          system along with all special files that refer to
                          the device.  This option cannot be used with -k.

           -C class       Match devices that belong to a given device class,
                          class.  Device classes can be listed with the
                          lsdev command (see lsdev(1M)).  They are defined
                          in files in the directory /usr/conf/master.d.
                          This option cannot be used with -d.

           -d driver      Match devices that are controlled by the specified
                          device driver, driver.  Device drivers can be
                          listed with the lsdev command (see lsdev(1M)).
                          They are defined in files in the directory
                          /usr/conf/master.d.  This option cannot be used
                          with -C.

           -D directory   Override the default device installation directory
                          /dev and remove the special files from directory
                          instead.  directory must exist; otherwise, rmsf
                          displays an error message and exits.  See
                          WARNINGS.

           -H hw_path     Match devices at a given hardware path, hw-path.
                          Hardware paths can be listed with the ioscan
                          command (see ioscan(1M)).  A hardware path
                          specifies the addresses of the hardware components
                          leading to a device.  It consists of a string of
                          numbers separated by periods (.), such as 52 (a
                          card), 52.3 (a target address), and 52.3.0 (a
                          device).  If a hardware component is a bus
                          converter, the following period, if any, is



 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003






 rmsf(1M)                                                           rmsf(1M)




                          replaced by a slash (/) as in 2, 2/3, and 2/3.0.

           -k             Remove the definition of the device from the
                          system, but not any special files.  This option
                          cannot be used with -a.

           -q             Quiet option.  Normally, rmsf displays a message
                          as each driver is removed.  This option suppresses
                          the driver message, but not error messages.  See
                          the -v option.

           -v             Verbose option.  In addition to the normal
                          processing message, display the name of each
                          special file as it is removed.  See the -q option.
                          Print the names of the files as rmsf is removing
                          them.

 RETURN VALUE    [Toc]    [Back]
      rmsf exits with one of the following values:

           0    Successful completion, including warning diagnostics.
           1    Failure.  An error occurred.

 DIAGNOSTICS    [Toc]    [Back]
      Most of the diagnostic messages from rmsf are self-explanatory.
      Listed below are some messages deserving further clarification.
      Errors cause rmsf to halt immediately.  Warnings allow the program to
      continue.

    Errors    [Toc]    [Back]
      No such device in the system

           No device in the system matched the options specified.  Use
           ioscan to list the devices in the system (see ioscan(1M)).

      special_file is not a special file

           The file is not associated with an I/O device.

    Warnings    [Toc]    [Back]
      WARNING: The specified hardware path is BUS_NEXUS/INTERFACE type.
           This will remove all the devices connected to it.

           The H/W type of the node specified by hw_path is
           BUS_NEXUS/INTERFACE. All the devices under this path will be
           removed.

      Cannot remove driver at hw_path

           The definition of the device located at hw_path and controlled by
           driver cannot be removed from the kernel.  That is driver does



 Hewlett-Packard Company            - 3 -   HP-UX 11i Version 2: August 2003






 rmsf(1M)                                                           rmsf(1M)




           not support the unbind function.

      No device associated with special_file

           The special file does not map to a device in the system; the file
           is removed unless the -k option was specified.

 EXAMPLES    [Toc]    [Back]
      Remove the special file mux0 from the current directory:

           rmsf ./mux0

      Remove the system definition of the device associated with /dev/lp0
      along with all special files that refer to the device:

           rmsf -a /dev/lp0

      Remove the system definitions for all devices associated with hardware
      path 52.6.0:

           rmsf -k -H 52.6.0

 WARNINGS    [Toc]    [Back]
      Most commands and subsystems assume their device files are in /dev,
      therefore the use of the -D option is discouraged.

      Most device drivers do not support the unbind operation necessary to
      remove the device from the system.

 AUTHOR    [Toc]    [Back]
      rmsf was developed by HP.

 FILES    [Toc]    [Back]
      /dev/config
      /etc/ioconfig
      /usr/conf/master.d/*

 SEE ALSO    [Toc]    [Back]
      rm(1), insf(1M), ioscan(1M), lsdev(1M), lssf(1M), mksf(1M),
      ioconfig(4).


 Hewlett-Packard Company            - 4 -   HP-UX 11i Version 2: August 2003
[ Back ]
      
      
 Similar pages
Name OS Title
mksf HP-UX make a special (device) file
comcontrol FreeBSD control a special tty device
intro HP-UX introduction to device special files
insf HP-UX install special (device) files
makedev IRIX create device special files
MAKEDEV OpenBSD create system and device special files
MAKEDEV OpenBSD create system and device special files
MAKEDEV OpenBSD create system and device special files
MAKEDEV OpenBSD create system and device special files
MAKEDEV OpenBSD create system and device special files
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service