hal: Branch 'master'
Danny Kukawka
dkukawka at kemper.freedesktop.org
Tue Aug 7 06:50:04 PDT 2007
hald/linux/acpi.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
New commits:
diff-tree 521e0e73d7f5d999289afa1a81c370451e6428d6 (from ea5031665092d90050036b13821b8a88df46bb4c)
Author: Danny Kukawka <danny.kukawka at web.de>
Date: Tue Aug 7 15:49:47 2007 +0200
fix get ACPI version from sysfs (fd.o #11290)
Fixed get ACPI version from sysfs with adopted patch from
Alan Swanson <swanson at ukfsn.org> to fix fd.o #11290.
The ACPI version string is since 2.6.21 in
/sys/module/acpi/parameters/acpica_version.
diff --git a/hald/linux/acpi.c b/hald/linux/acpi.c
index 327956f..924c64b 100644
--- a/hald/linux/acpi.c
+++ b/hald/linux/acpi.c
@@ -896,11 +896,11 @@ acpi_synthesize_hotplug_events (void)
hal_util_set_string_elem_from_file (computer, "power_management.acpi.linux.version",
"/proc/acpi", "info", "version", 0, FALSE);
} else {
- gchar *firmware_path;
- firmware_path = g_strdup_printf ("%s/firmware/acpi", get_hal_sysfs_path ());
- hal_util_set_string_elem_from_file (computer, "power_management.acpi.linux.version",
- firmware_path, "info", "version", 0, FALSE);
- g_free (firmware_path);
+ if (!hal_util_set_string_from_file (computer, "power_management.acpi.linux.version",
+ "/sys/module/acpi/parameters", "acpica_version"))
+ /* Fallback for some older kernel version, can get removed if HAL depends on >= 2.6.21 */
+ hal_util_set_string_elem_from_file (computer, "power_management.acpi.linux.version",
+ "/sys/firmware/acpi", "info", "version", 0, FALSE);
}
/* collect batteries */
More information about the hal-commit
mailing list