United States-English |
|
|
HP-UX Reference > Llsdev(1M)HP-UX 11i Version 3: February 2007 |
|
NAMElsdev — list device drivers in the system SYNOPSIS/usr/sbin/lsdev [-h] [-d driver | -C class] [-b block_major] [-c char_major] [-e major] [major ...] DESCRIPTIONThe lsdev command lists, one pair per line, the major device numbers and driver names of device drivers configured into the system and available for invocation via special files. A -1 in either the block or character column means that a major number does not exist for that type. If no arguments are specified, lsdev lists all drivers configured into the system. If the -h option is specified, lsdev will not print a heading. This option may be useful when the output of lsdev will be used by another program. The -d, -C, -b, -c, and -e options are used to select specific device drivers for output. If more than one option is specified, all drivers that match the criteria specified by those options will be listed. These search options are divided into two types: name search keys (the -d and -C options) and major number search keys (the -b, -c, and -e options). If both types of options are present, only entries that match both types are printed. The same type of option may appear more than once on the command line with each occurrence providing an ORing effect of that search type. The -d and -C options may not be specified at the same time. The ability to process major arguments is provided for compatibility and functions like the -e option. Options
DIAGNOSTICS
EXAMPLESTo output entries for all drivers in the pseudo class: lsdev -C pseudo To output entries that are in the class disk that have either a block or character major number of 0: lsdev -C disk -e 0 To get the character major number of my_driver into a shell environment variable: C_MAJOR=$(lsdev -h -d my_driver | awk '{print $1}') WARNINGSSome device drivers available from the system may be intended for use by other drivers. Attempting to use them directly from a special file may produce unexpected results. A driver may be listed even when the hardware requiring the driver is not present. Attempts to access a driver without the corresponding hardware will fail. lsdev only lists drivers that are configured into the currently executing kernel. For a complete list of available drivers, please run sam (see sam(1M). DEPENDENCIESSince lsdev relies on the device driver information provided in a driver_install routine, lsdev may not list drivers installed by other means. |
Printable version | ||
|