forked from enlightenment/efl
eeze watches now detect loopback devices slightly more correctly
SVN revision: 73520
This commit is contained in:
parent
06d0a924ba
commit
e628e1d2b0
|
@ -100,3 +100,8 @@
|
|||
2012-06-29 Christophe Dumez (christophe.dumez@intel.com)
|
||||
|
||||
* Added joystick detection
|
||||
|
||||
2012-07-10 Mike Blumenkrantz
|
||||
|
||||
* Add a check in event monitoring for disks which ensures that
|
||||
device changes for loopback devices are picked up
|
||||
|
|
|
@ -192,7 +192,15 @@ _get_syspath_from_watch(void *data,
|
|||
#endif
|
||||
if (!(test = (udev_device_get_property_value(device, "ID_FS_USAGE"))) ||
|
||||
(strcmp("filesystem", test)))
|
||||
goto error;
|
||||
{
|
||||
if (event & EEZE_UDEV_EVENT_CHANGE)
|
||||
{
|
||||
test = udev_device_get_sysname(device);
|
||||
if (!test) goto error;
|
||||
if (!strncmp(test, "loop", 4)) break;
|
||||
}
|
||||
goto error;
|
||||
}
|
||||
{
|
||||
int devcheck;
|
||||
|
||||
|
@ -210,7 +218,7 @@ _get_syspath_from_watch(void *data,
|
|||
test = udev_device_get_property_value(device, "ID_BUS");
|
||||
if ((!test) || strcmp(test, "ata")) goto error;
|
||||
test = udev_device_get_property_value(device, "ID_TYPE");
|
||||
if ((!test) || strcmp(test, "disk")) goto error;
|
||||
if (!(event & EEZE_UDEV_EVENT_CHANGE) && ((!test) || strcmp(test, "disk"))) goto error;
|
||||
break;
|
||||
|
||||
case EEZE_UDEV_TYPE_DRIVE_REMOVABLE:
|
||||
|
|
Loading…
Reference in New Issue