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:
parent
d55a77bae9
commit
39e04f7f4c
|
@ -216,9 +216,8 @@ _get_syspath_from_watch(void *data,
|
||||||
|| (strcmp(test, "power_supply")))
|
|| (strcmp(test, "power_supply")))
|
||||||
goto error;
|
goto error;
|
||||||
#endif
|
#endif
|
||||||
if (!(test = udev_device_get_property_value(device, "POWER_SUPPLY_TYPE"))
|
test = udev_device_get_property_value(device, "POWER_SUPPLY_ONLINE");
|
||||||
|| (strcmp("Mains", test)))
|
if (!test) goto error;
|
||||||
goto error;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EEZE_UDEV_TYPE_POWER_BAT:
|
case EEZE_UDEV_TYPE_POWER_BAT:
|
||||||
|
@ -227,9 +226,8 @@ _get_syspath_from_watch(void *data,
|
||||||
|| (strcmp(test, "power_supply")))
|
|| (strcmp(test, "power_supply")))
|
||||||
goto error;
|
goto error;
|
||||||
#endif
|
#endif
|
||||||
if (!(test = udev_device_get_property_value(device, "POWER_SUPPLY_TYPE"))
|
test = udev_device_get_property_value(device, "POWER_SUPPLY_PRESENT");
|
||||||
|| (strcmp("Battery", test)))
|
if (!test) goto error;
|
||||||
goto error;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EEZE_UDEV_TYPE_NET:
|
case EEZE_UDEV_TYPE_NET:
|
||||||
|
|
Loading…
Reference in New Issue