diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2009-02-03 01:54:59 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2009-02-03 01:54:59 +0000 |
commit | f29822d4d4ebbca34fabf39c5782b602b5341b52 (patch) | |
tree | 16a65c3148378572e50157f3e9cb9041834dc26b /sysutils/hal | |
parent | Fixup icons extraction. (diff) |
Fix breakages introduced in the previous commit. hf_has_sysctl() is only
capable of finding the leaf node.
Pointyhat to: jkim
Diffstat (limited to 'sysutils/hal')
-rw-r--r-- | sysutils/hal/files/patch-hald_freebsd_hf-acpi.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/sysutils/hal/files/patch-hald_freebsd_hf-acpi.c b/sysutils/hal/files/patch-hald_freebsd_hf-acpi.c index e7dae7a9a63d..08da6b1456be 100644 --- a/sysutils/hal/files/patch-hald_freebsd_hf-acpi.c +++ b/sysutils/hal/files/patch-hald_freebsd_hf-acpi.c @@ -1,25 +1,34 @@ --- hald/freebsd/hf-acpi.c.orig 2008-05-07 19:23:59.000000000 -0400 -+++ hald/freebsd/hf-acpi.c 2009-01-30 15:53:14.000000000 -0500 -@@ -105,6 +105,9 @@ hf_acpi_poll_batt (HalDevice *device) ++++ hald/freebsd/hf-acpi.c 2009-02-02 20:32:05.000000000 -0500 +@@ -105,6 +105,9 @@ gboolean ispresent; union acpi_battery_ioctl_arg battif, battst, battinfo; -+ if (! hf_has_sysctl("hw.acpi.battery")) ++ if (! hf_has_sysctl("hw.acpi.battery.units")) + return; + battif.unit = battst.unit = battinfo.unit = hal_device_property_get_int(device, "freebsd.unit"); -@@ -504,6 +507,8 @@ hf_acpi_laptop_panel_new (HalDevice *par +@@ -500,10 +503,17 @@ + const char *max_sysctl, const char *access, + const char *name) + { ++ char *brightness; + HalDevice *device; g_return_val_if_fail(HAL_IS_DEVICE(parent), NULL); -+ if (! hf_has_sysctl("hw.acpi.%s", access)) ++ if (! strcmp(access, "sony")) ++ brightness = "brightness"; ++ else ++ brightness = "lcd_brightness"; ++ if (! hf_has_sysctl("hw.acpi.%s.%s", access, brightness)) + return NULL; device = hf_device_new(parent); hf_device_property_set_string_printf(device, "info.product", "Laptop Panel (%s)", name); -@@ -597,7 +602,8 @@ hf_acpi_probe (void) +@@ -597,7 +607,8 @@ laptop_panel_types[i].max_sysctl, laptop_panel_types[i].access, laptop_panel_types[i].name); |