devfsadm, devfsadmd – administration command for /dev
/usr/sbin/devfsadm [-C] [-c device_class] [-i driver_name]
[ -n] [-r root_dir] [-s] [-t table_file] [-u] [-v]
/usr/lib/devfsadm/devfsadmd
devfsadm maintains the /dev namespace. It replaces the previous suite of devfs
administration tools including drvconfig(1M), disks(1M), tapes(1M), ports(1M),
audlinks(1M), and devlinks(1M).
The default operation is to attempt to load every driver in the system and attach to all possible
device instances.Next, devfsadm creates logical links to device nodes in /dev and /devices
and loads the device policy.
devfsadmd(1M) is the daemon version of devfsadm(1M). The daemon is started during
system startup and is responsible for handling both reconfiguration boot processing and
updating /dev and /devices in response to dynamic reconfiguration event notifications from
the kernel.
For compatibility purposes, drvconfig(1M), disks(1M), tapes(1M), ports(1M),
audlinks(1M), and devlinks(1M) are implemented as links to devfsadm.
In addition to managing /dev, devfsadm also maintains the path_to_inst(4) database.
The following options are supported:
-C
Cleanup mode. Prompt devfsadm to cleanup dangling /dev links that are not normally
removed. If the -c option is also used, devfsadm only cleans up for the listed devices'
classes.
-c device_class
Restrict operations to devices of class device_class. Solaris defines the following values for
device_class: disk, tape, port, audio, and pseudo. This option might be specified more
than once to specify multiple device classes.
-i driver_name
Configure only the devices for the named driver, driver_name.
-n
Do not attempt to load drivers or add new nodes to the kernel device tree.
-s
Suppress any changes to /dev. This is useful with the -v option for debugging.
-t table_file
Read an alternate devlink.tab file. devfsadm normally reads /etc/devlink.tab.
引用名
用法概要
描述
选项
devfsadm(1M)
系统管理命令-第1 单元327
-u
Activate and attach devices for drivers added with add_drv(1M) -u. Cannot be used
together with -n or -r.
-r root_dir
Presume that the /dev directory trees are found under root_dir, not directly under root
(/).No other use or assumptions are made about root_dir.
-v
Print changes to /dev in verbose mode.
The following exit values are returned:
0
Successful completion.
1
An error occurred.
/devices
device nodes directory
/dev
logical symbolic links to /devices
/usr/lib/devfsadm/devfsadmd
devfsadm daemon
/dev/.devfsadm_dev.lock
update lock file
/dev/.devfsadm_daemon.lock
daemon lock file
/etc/security/device_policy
device policy file
/etc/security/extra_privs
additional device privileges
devfsadmin命令是对新加设备进行在线识别和加载。
# devfsadm -c disk (对系统新加的磁盘进行识别)
# devfsadm -C (清除/dev中不正常删除的设备)
en