[systemd-devel] udevd detect and list ata devices

Marek mlf.conv at gmail.com
Fri Nov 20 11:59:21 PST 2015


hi,

i'm using the following code:
http://stackoverflow.com/questions/25361042/how-to-list-usb-mass-storage-devices-programatically-using-libudev-in-linux?lq=1
the problem is with this section of code:
 struct udev_device* usb
          = udev_device_get_parent_with_subsystem_devtype(scsi, "usb",
"usb_device");
which along with
              udev_device_get_sysattr_value(usb, "manufacturer"),
                 udev_device_get_sysattr_value(usb, "product"),
                 udev_device_get_sysattr_value(usb, "serial"));
would output all requested values, but changing "usb", "usb_device" to
ata and ata_device doesn't work and the program doesnt output
anything.

Marek


More information about the systemd-devel mailing list