try something new for battery/ac detection. this may break some stuff, so ping me if your battery gadget stops working...

SVN revision: 61967
This commit is contained in:
Mike Blumenkrantz 2011-08-01 20:30:29 +00:00
parent d55a77bae9
commit 39e04f7f4c
1 changed files with 4 additions and 6 deletions

View File

@ -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: