From: Spamless (Spamless_at_Nil.nil)
Date: Fri, 23 Jul 2004 15:20:23 GMT
In article <email@example.com>, Mauro G. wrote:
> I need to understand what is the mean of aliases "char-major-..." or
> Does anyone help me?!
Linux uses a "file" method to access kernel services.
You have a directory /dev.
Those are not devices. They are nodes (created with mknod)
to point to kernel routines (either in the kernel or loaded
from modules if the kernel was compiled with module support
for that device).
Some devices are block devices and some are character oriented
If you do an "ls -l /dev" you will find entries such as:
brw-rw---- ... 3, 1 Sep 15 2003 hda1
crw------- ... 14, 0 Jul 22 21:14 mixer0
The first character (b or c) indicates block or character
device. While the /dev system uses what "appear" to be
file entries (so you can dump stuff to /dev/[something]
to get it handled by the driver which handles that sort
of data), they are actually tracked by a type, major number
and minor number.
In the above, hda1 is a block device with major number 3
and minor number 1 (often the minor numbers simply represent
different location for the same sort of item, e.g. disk1,
If you have the kernel source installed, the text file:
has the list of devices - type and major and minor numbers
(you can have one block device and on character device with the
same major/minor numbers such as
9,1 (major,minor) character device: /dev/st1 Second SCSI tape, mode 0
9,1 (major,minor) block device: /dev/md1 Second metadisk group
(minor number 0 would be the First SCSI tape and metadisk group)