Comment 1 for bug 399319

Revision history for this message
Abel Deuring (adeuring) wrote :

After comparing the output of "lshal" and "udevadm info --export-db" for a few machines and peripherals, I think we get nearly enough data from udevadm and the DMI related sysfs files. (we need mainly vendor/product IDs or vendor/model strings for SCSI devices; the device class/subclass for PCI and USB devices)

 On the positive side, udevadm returns vendor/product data for bluetooth devices, which is missing in HAL.

The only major problem I found is related to some SCSI devices: While the udevadm output contains the SCSI vendor and model strings for disks and CD drives which use the kernel's SCSI layer (.i.e., not only real SCSI devices, but also ATA drives), this data is missing for SCSI scanners. I assume that it is as well missing for the SCSI device type "processor" (used for some Epson and HP scanners, and for example for tape robots.)

But sysfs provides this data: The main directory of a SCSI device, for example /sys/devices/pci0000:00/0000:00:1e.0/0000:15:00.0/0000:16:00.0/host5/target5:0:6/5:0:6:0/, contains the files "vendor", "model" and "type", which provide exactly the data we need.

These directories are easy to find: If a udev path name ends with "/scsi_generic/sgN" (where N is a number), replace this string by "vendor", "model", "type".