[ Pobierz całość w formacie PDF ]
.You must specify both a major and minor number for any new block, character, or unbuffered mode devices.You don't need to specify device numbers for a type p device.You can pull the major and minor device numbers out of thin air as long as they don't conflict with any other device, but there is a general numbering convention for all devices.These numbering systems are discussed in more detail in the chapters on specific devices later in this part.Device Permissions and LinksWhen you create a new device with the mknod command, it is given the permissions associated with the symbolic value 666.You can override this value either on the mknod command line (with the -p option) or by using chmod afterwards to change the permissions.Device file permissions are important as they can control access to the device.For example, a CD-ROM drive is a read-only device, and changing the permissions to prevent write access can help forestall many error messages when a user tries to write to the CD-ROM.Permissions are also useful for creating read-only partitions on a disk, such as a directory of databases or utilities that you don't want anyone modifying.Chapter 17, "System Names and Access Permissions," looks at the chmod command and file permissions in more detail.As a general rule, the default permissions are valid for most devices unless you want to lock out access.When Linux installs the device files, it sets all the system devices (such as /dev/mem, the physical RAM) with the proper permissions and you shouldn't change them.SummaryThis chapter introduced device drivers and device numbers, both of which are important when you add new hardware to your system.The next few chapters look at the different hardware that you can add to expand your Linux system and how they are configured.This chapter's information will be important as you configure Linux to accept new devices
[ Pobierz całość w formacie PDF ]