[systemd-devel] udevd detect and list ata devices

Robert Milasan rmilasan at suse.com
Sun Dec 6 23:24:29 PST 2015


On Sun, 6 Dec 2015 17:46:09 +0100
"Marek" <mlf.conv at gmail.com> wrote:

> thanks Robert, eample2 does list all disks but doens't differentiate
> between ata and usb.

You could add a little hack like this in the udev_example2.c code:

  if (strstr(udev_device_get_syspath(dev), "/ata") != NULL) {
	....
  }

-- 
Robert Milasan

L3 Support Engineer
SUSE Linux (http://www.suse.com)
email: rmilasan at suse.com
GPG fingerprint: B6FE F4A8 0FA3 3040 3402  6FE7 2F64 167C 1909 6D1A


More information about the systemd-devel mailing list