|s i s t e m a o p e r a c i o n a l m a g n u x l i n u x||~/ · documentação · suporte · sobre|
3.3. Device Names in devfs
The device pseudo file system can be mounted as /dev in which case it replaces the traditional Linux device subdirectory. Alternatively it can be mounted elsewhere (e.g. /devfs) and supplement the existing device structure.
Without devfs, devices names are typically maintained in the dev directory of the root partition. Hence the device names (and their associated permissions) have file system persistence. The existence of a device name does not necessarily imply such a device (or even its driver) is present. To save users having to create device name entries (with the mknod command) most Linux distributions come with thousands of device names defined in the /dev directory. When applications try to open() the device name then a errno value of ENODEV indicates there is no corresponding device (or driver) currently available.
Devfs takes a different approach in which the existence of the device name is directly related to the presence of the corresponding device (and its driver).
Assuming devfs is mounted on /dev then SCSI devices have primary device names that might look like this:
[Notice the spelling of "disc" as the devfs author favours English spelling over the American variant.] It can be seen that devfs's naming scheme closely matches the SCSI addressing discussed in Section 3.1. It is worth noting that the IDE subsystem uses a similar devfs device naming scheme with the word "scsi" replaced with "ide". Devfs is discussed further in Chapter 12.