fix a dead store and make removable drive finds return non-usb devices as well
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Sat, 15 Jan 2011 20:24:13 +0000 (20:24 +0000)
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Sat, 15 Jan 2011 20:24:13 +0000 (20:24 +0000)
SVN revision: 56142

legacy/eeze/src/lib/eeze_udev_find.c

index 08c4e8b..d559876 100644 (file)
@@ -275,7 +275,7 @@ eeze_udev_find_by_type(Eeze_Udev_Type etype,
                goto out;
 
              /* if device is not the one which has the temp input, we must go up the chain */
-             if (!(test = udev_device_get_sysattr_value(device, "temp1_input")))
+             if (!udev_device_get_sysattr_value(device, "temp1_input"))
                {
                   devname = NULL;
 
@@ -297,7 +297,7 @@ eeze_udev_find_by_type(Eeze_Udev_Type etype,
           }
         else if (etype == EEZE_UDEV_TYPE_DRIVE_REMOVABLE)
           {
-             if (!(test = udev_device_get_property_value(device, "ID_USB_DRIVER")))
+             if (!(test = udev_device_get_property_value(device, "ID_BUS")) || (!strncmp(test, "ata", 3)))
                goto out;
           }
         else if (etype == EEZE_UDEV_TYPE_DRIVE_MOUNTABLE)