hal/hald/linux2/addons addon-acpi.c,1.6,1.7

David Zeuthen david at freedesktop.org
Mon May 16 10:42:08 PDT 2005


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

Modified Files:
	addon-acpi.c 
Log Message:
2005-05-16  David Zeuthen  <davidz at redhat.com>

	* hald/linux2/addons/addon-acpi.c (main): Whilst using CVS, I've
	found that ACPI ac_adapter events are not triggering a rescan of
	the ac_adapter object. 
	Patch from Richard Hughes <hughsient at gmail.com>



Index: addon-acpi.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/addons/addon-acpi.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- addon-acpi.c	8 Apr 2005 18:10:20 -0000	1.6
+++ addon-acpi.c	16 May 2005 17:42:05 -0000	1.7
@@ -149,7 +149,7 @@
 
 			snprintf (udi, sizeof (udi), "/org/freedesktop/Hal/devices/acpi_%s", acpi_name);
 
-			if (strncmp (acpi_path, "button/", sizeof ("button/") - 1) == 0) {
+			if (strncmp (acpi_path, "button", sizeof ("button") - 1) == 0) {
 				dbg ("button event");
 
 				/* TODO: only rescan if button got state */
@@ -159,7 +159,7 @@
 				dbus_error_init (&error);
 				libhal_device_emit_condition (ctx, udi, "ButtonPressed", "", &error);
 
-			} else if (strncmp (acpi_path, "ac_adapter", sizeof ("ac_adapter/") - 1) == 0) {
+			} else if (strncmp (acpi_path, "ac_adapter", sizeof ("ac_adapter") - 1) == 0) {
 				dbg ("ac_adapter event");
 				dbus_error_init (&error);
 				libhal_device_rescan (ctx, udi, &error);




More information about the hal-commit mailing list