hal/hald/linux2 acpi.c,1.9,1.10 pmu.c,1.5,1.6
David Zeuthen
david at freedesktop.org
Wed Mar 2 11:22:12 PST 2005
Update of /cvs/hal/hal/hald/linux2
In directory gabe:/tmp/cvs-serv22224/hald/linux2
Modified Files:
acpi.c pmu.c
Log Message:
2005-03-02 Richard Hughes <richard at hughsie.com>
* doc/spec/hal-spec.xml.in: Removed all the 'system.'
prefixes to the ACPI and PMU objects, they serve no purpose
other to confuse people.
* hald/linux2/acpi.c (ac_adapter_refresh, button_refresh):
Removed 'system.' prefix.
* hald/linux2/pmu.c (ac_adapter_refresh): Removed
'system.' prefix.
* hald/util.c: Updated comment regarding 'system.'
Index: acpi.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/acpi.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- acpi.c 24 Feb 2005 17:33:03 -0000 1.9
+++ acpi.c 2 Mar 2005 19:22:10 -0000 1.10
@@ -117,9 +117,9 @@
return FALSE;
hal_device_property_set_string (d, "info.product", "AC Adapter");
- hal_device_property_set_string (d, "info.category", "system.ac_adapter");
- hal_device_add_capability (d, "system.ac_adapter");
- hal_util_set_bool_elem_from_file (d, "system.ac_adapter.present", path, "state", "state", 0, "on-line");
+ hal_device_property_set_string (d, "info.category", "ac_adapter");
+ hal_device_add_capability (d, "ac_adapter");
+ hal_util_set_bool_elem_from_file (d, "ac_adapter.present", path, "state", "state", 0, "on-line");
return TRUE;
}
@@ -138,7 +138,7 @@
parent_path = hal_util_get_parent_path (path);
button_type = hal_util_get_last_element (parent_path);
- hal_device_property_set_string (d, "system.button.type", button_type);
+ hal_device_property_set_string (d, "button.type", button_type);
if (strcmp (button_type, "power") == 0)
hal_device_property_set_string (d, "info.product", "Power Button");
@@ -147,12 +147,12 @@
else if (strcmp (button_type, "sleep") == 0)
hal_device_property_set_string (d, "info.product", "Sleep Button");
- hal_device_property_set_string (d, "info.category", "system.button");
- hal_device_add_capability (d, "system.button");
- if (!hal_util_set_bool_elem_from_file (d, "system.button.state.value", path, "state", "state", 0, "closed")) {
- hal_device_property_set_bool (d, "system.button.has_state", FALSE);
+ hal_device_property_set_string (d, "info.category", "button");
+ hal_device_add_capability (d, "button");
+ if (!hal_util_set_bool_elem_from_file (d, "button.state.value", path, "state", "state", 0, "closed")) {
+ hal_device_property_set_bool (d, "button.has_state", FALSE);
} else {
- hal_device_property_set_bool (d, "system.button.has_state", TRUE);
+ hal_device_property_set_bool (d, "button.has_state", TRUE);
}
g_free (parent_path);
Index: pmu.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux2/pmu.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pmu.c 24 Feb 2005 16:50:35 -0000 1.5
+++ pmu.c 2 Mar 2005 19:22:10 -0000 1.6
@@ -123,10 +123,10 @@
return FALSE;
hal_device_property_set_string (d, "info.product", "AC Adapter");
- hal_device_property_set_string (d, "info.category", "system.ac_adapter");
- hal_device_add_capability (d, "system.ac_adapter");
+ hal_device_property_set_string (d, "info.category", "ac_adapter");
+ hal_device_add_capability (d, "ac_adapter");
- hal_util_set_bool_elem_from_file (d, "system.ac_adapter.present", path, "", "AC Power", 0, "1");
+ hal_util_set_bool_elem_from_file (d, "ac_adapter.present", path, "", "AC Power", 0, "1");
return TRUE;
}
More information about the hal-commit
mailing list