hal/hald/linux2/addons addon-hid-ups.c,1.11,1.12
David Zeuthen
david at freedesktop.org
Wed Jan 11 06:13:50 PST 2006
Update of /cvs/hal/hal/hald/linux2/addons
In directory gabe:/tmp/cvs-serv25464/hald/linux2/addons
Modified Files:
addon-hid-ups.c
Log Message:
2006-01-11 David Zeuthen <davidz at redhat.com>
* hald/linux2/addons/addon-hid-ups.c: Also add battery.reporting.*
properties
Index: addon-hid-ups.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/addons/addon-hid-ups.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- addon-hid-ups.c 27 Sep 2005 11:19:06 -0000 1.11
+++ addon-hid-ups.c 11 Jan 2006 14:13:47 -0000 1.12
@@ -166,6 +166,12 @@
ctx, udi, "battery.charge_level.percentage", uref.value, &error);
libhal_device_set_property_string (
ctx, udi, "battery.charge_level.unit", "percent", &error);
+ libhal_device_set_property_int (
+ ctx, udi, "battery.reporting.current", uref.value, &error);
+ libhal_device_set_property_int (
+ ctx, udi, "battery.reporting.percentage", uref.value, &error);
+ libhal_device_set_property_string (
+ ctx, udi, "battery.reporting.unit", "percent", &error);
break;
case UPS_RUNTIME_TO_EMPTY:
@@ -228,6 +234,10 @@
ctx, udi, "battery.charge_level.design", uref.value, &error);
libhal_device_set_property_int (
ctx, udi, "battery.charge_level.last_full", uref.value, &error);
+ libhal_device_set_property_int (
+ ctx, udi, "battery.reporting.design", uref.value, &error);
+ libhal_device_set_property_int (
+ ctx, udi, "battery.reporting.last_full", uref.value, &error);
break;
default:
@@ -303,6 +313,10 @@
ctx, udi, "battery.charge_level.current", ev[i].value, &error);
libhal_device_set_property_int (
ctx, udi, "battery.charge_level.percentage", ev[i].value, &error);
+ libhal_device_set_property_int (
+ ctx, udi, "battery.reporting.current", ev[i].value, &error);
+ libhal_device_set_property_int (
+ ctx, udi, "battery.reporting.percentage", ev[i].value, &error);
break;
case UPS_RUNTIME_TO_EMPTY:
More information about the hal-commit
mailing list