struct udev *udev;
struct udev_device *dev = NULL, *usb;
int r = -1;
+ const char *a;
assert(d);
goto finish;
}
+ if ((a = udev_device_get_property_value(dev, "ID_ATA_SMART_ACCESS"))) {
+ unsigned u;
+
+ for (u = 0; u < _SK_DISK_TYPE_MAX; u++) {
+ const char *t;
+
+ if (!(t = disk_type_to_prefix_string(u)))
+ continue;
+
+ if (!strcmp(a, t)) {
+ d->type = u;
+ r = 0;
+ goto finish;
+ }
+ }
+
+ d->type = SK_DISK_TYPE_NONE;
+ r = 0;
+ goto finish;
+ }
+
if ((usb = udev_device_get_parent_with_subsystem_devtype(dev, "usb", "usb_device"))) {
const char *product, *vendor;
uint32_t pid, vid;