diff --git a/legacy/eeze/src/lib/eeze_udev_watch.c b/legacy/eeze/src/lib/eeze_udev_watch.c index a071f2a246..cebfaaba42 100644 --- a/legacy/eeze/src/lib/eeze_udev_watch.c +++ b/legacy/eeze/src/lib/eeze_udev_watch.c @@ -216,9 +216,8 @@ _get_syspath_from_watch(void *data, || (strcmp(test, "power_supply"))) goto error; #endif - if (!(test = udev_device_get_property_value(device, "POWER_SUPPLY_TYPE")) - || (strcmp("Mains", test))) - goto error; + test = udev_device_get_property_value(device, "POWER_SUPPLY_ONLINE"); + if (!test) goto error; break; case EEZE_UDEV_TYPE_POWER_BAT: @@ -227,9 +226,8 @@ _get_syspath_from_watch(void *data, || (strcmp(test, "power_supply"))) goto error; #endif - if (!(test = udev_device_get_property_value(device, "POWER_SUPPLY_TYPE")) - || (strcmp("Battery", test))) - goto error; + test = udev_device_get_property_value(device, "POWER_SUPPLY_PRESENT"); + if (!test) goto error; break; case EEZE_UDEV_TYPE_NET: