[lkml]   [2003]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] /proc/devices for block devices
Christoph Hellwig wrote [on /proc/devices]:

> We could either
> (a) nuke it completly - if you need to find out the dev_t for your
> block driver with dynamic dev_t allocation you can look at
> /proc/partitions (portable to older kernels) or sysfs instead.
> (b) add some cludges

A grep on a random source tree shows:

A number of programs search /proc/devices for their favourite string,
find the device number and do mknod on it. Thus apmd for "apm_bios"
and IMonLinux for "imon" and hwcrypto for "paep" and "cryptonet".

Apart from for finding out dev_t, /proc/devices is used for
just checking that a certain driver exists in a certain kernel.

There are FAQs that tell people to check for "lp" or "sg"
or "sound" or "pcmcia" in /proc/devices.

The program anaconda checks /proc/devices for "fd" and for "pcmcia".
Various initscripts check for "usb", "sound", "sparcaudio".
SANE checks for "sg". Setserial checks for "ttyS".
Lomount and mount check for "loop".

LVM programs go the other way and use /proc/devices to find out
whether the device with given device number is of type "ide", "sd",
"nbd", "loop" etc.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:35    [W:0.048 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site