From e8b04361970c78cc7c3bca93cc9e869a23501e29 Mon Sep 17 00:00:00 2001 From: Sebastian Dransfeld Date: Tue, 6 Sep 2011 19:07:34 +0000 Subject: [PATCH] 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 --- legacy/eeze/src/lib/eeze_udev_watch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/eeze/src/lib/eeze_udev_watch.c b/legacy/eeze/src/lib/eeze_udev_watch.c index cebfaaba42..ab3a57c224 100644 --- a/legacy/eeze/src/lib/eeze_udev_watch.c +++ b/legacy/eeze/src/lib/eeze_udev_watch.c @@ -227,7 +227,7 @@ _get_syspath_from_watch(void *data, goto error; #endif test = udev_device_get_property_value(device, "POWER_SUPPLY_PRESENT"); - if (!test) goto error; + if ((!test) || (strcmp(test, "1"))) goto error; break; case EEZE_UDEV_TYPE_NET: