Re: /dev/sd*
From: Gabor Gombas <hidden>
Date: 2006-08-19 00:15:26
Also in:
lkml
On Fri, Aug 18, 2006 at 08:45:38AM -0400, Bill Davidsen wrote:
For discussion I suggest /proc/ata/devices, a single flat file matching a name meaningful to open() with a vendor string and whatever other info is handy, like serial number and the like.
Why just ATA? Let it contain all disk-like devices in the system, and
add an extra field showing the transport method
(IDE/USB/SCSI/SATA/whatever) the device is currently using.
Hmm, /sys/block already contains all the kernel-internal device names,
/sys/block/*/device already gives the physical location. We might just
need a couple additional attributes (like "serial") for user
convenience, and a little shell script that walks /sys/block and emits
an unified device list?
Alternatively, the shell scipt could use blktool to collect the data not
already present under /sys/block, so there would be no need to modify
the kernel at all. blktool could be modified to accept a path name under
/sys/block as well as a device node, and print some more data the serial
number when using the "id" command, but I think that's doable.
Gabor
--
---------------------------------------------------------
MTA SZTAKI Computer and Automation Research Institute
Hungarian Academy of Sciences
---------------------------------------------------------