Eeze: And only send event for present batteries

The property POWER_SUPPLY_PRESENT must not only be there, but also have
a true value.

SVN revision: 63228
This commit is contained in:
Sebastian Dransfeld 2011-09-06 19:07:34 +00:00
parent 2ee03004d6
commit e8b0436197
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ _get_syspath_from_watch(void *data,
goto error; goto error;
#endif #endif
test = udev_device_get_property_value(device, "POWER_SUPPLY_PRESENT"); test = udev_device_get_property_value(device, "POWER_SUPPLY_PRESENT");
if (!test) goto error; if ((!test) || (strcmp(test, "1"))) goto error;
break; break;
case EEZE_UDEV_TYPE_NET: case EEZE_UDEV_TYPE_NET: