Prev | Current Page 800 | Next

Michael McCallister

"openSUSE Linux Unleashed"


This is the minor number. For example, device file hda has a major number of 3 and a
minor number of 0. The minor number identifies the specific node of the device. In
Figure 18.20, you can see that device hda1 (the first partition on the master IDE hard
drive on the primary IDE channel) has a major number of 3 and a minor number of 1.
In addition, the output of ls, as shown in Figure 18.20, indicates the type of device represented
by each file. This is indicated by the first character of each line. Notice that each
hda line in Figure 18.21 begins with a b. This indicates that the IDE hard disk drives are
block devices. By way of comparison, refer to Figure 18.21.
The tty devices shown in Figure 18.21 are serial devices. Accordingly, they have a c as the
first character in each line of the output of ls, indicating that these files represent character
devices.
You can create your own character or block device files. This is done with the mknod
utility. The syntax of mknod is as follows:
mknod file_name device_type major_number minor_number
References 401
FIGURE 18.


Pages:
788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812
pozycjonowanie stron news nowoĊ›ci designerskie news news