hal/hald/linux2 acpi.c,1.17,1.18

David Zeuthen david at freedesktop.org
Thu Mar 10 12:17:22 PST 2005


Update of /cvs/hal/hal/hald/linux2
In directory gabe:/tmp/cvs-serv13948/hald/linux2

Modified Files:
	acpi.c 
Log Message:
2005-03-10  David Zeuthen  <davidz at redhat.com>

	* hald/linux2/acpi.c (battery_refresh_poll): Also set property
	battery.charge_level.rate
	(acpi_poll): Make the update atomic
	
	* doc/spec/hal-spec.xml.in: Update for battery.charge_level.rate



Index: acpi.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/acpi.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- acpi.c	10 Mar 2005 19:44:11 -0000	1.17
+++ acpi.c	10 Mar 2005 20:17:20 -0000	1.18
@@ -71,6 +71,8 @@
 					  "state", "charging state", 0, "discharging", TRUE);
 	hal_util_set_int_elem_from_file (d, "battery.charge_level.current", path, 
 					 "state", "remaining capacity", 0, 10, TRUE);
+	hal_util_set_int_elem_from_file (d, "battery.charge_level.rate", path, 
+					 "state", "present rate", 0, 10, TRUE);
 }
 
 static gboolean
@@ -283,7 +285,9 @@
 		d = HAL_DEVICE (i->data);
 		if (hal_device_has_property (d, "linux.acpi_type")) {
 			hal_util_grep_discard_existing_data ();
+			device_property_atomic_update_begin ();
 			battery_refresh_poll (d);
+			device_property_atomic_update_end ();		
 		}
 	}
 




More information about the hal-commit mailing list