hal: Branch 'hal-0_5_8-branch'
David Zeuthen
david at kemper.freedesktop.org
Tue Oct 3 09:00:00 PDT 2006
hald/linux/osspec.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
New commits:
diff-tree 7c240196eae1cce8bf511dffaa7019e08383d1fb (from 5cbbf1ca4fa93483373186c7a33eff02761137d8)
Author: David Woodhouse <dwmw2 at redhat.com>
Date: Tue Oct 3 11:57:51 2006 -0400
fix crash on PPC Pegasos that don't have PMU, ACPI or APM
Also adds Pegasos to OF formfactor probing.
(cherry picked from bc96ff3b760917f4431015d9782d3d70f8b337ea commit)
diff --git a/hald/linux/osspec.c b/hald/linux/osspec.c
index 1b322bb..31ef498 100644
--- a/hald/linux/osspec.c
+++ b/hald/linux/osspec.c
@@ -448,6 +448,7 @@ set_suspend_hibernate_keys (HalDevice *d
ssize_t read;
size_t len;
char *poweroptions;
+ char *pmtype;
FILE *fp;
can_suspend = FALSE;
@@ -473,7 +474,8 @@ set_suspend_hibernate_keys (HalDevice *d
can_hibernate = TRUE;
free (poweroptions);
- if (strcmp(hal_device_property_get_string(d, "power_management.type"), "pmu") == 0) {
+ pmtype = hal_device_property_get_string(d, "power_management.type");
+ if (pmtype != NULL && strcmp(pmtype, "pmu") == 0) {
/* We got our own helper for suspend PMU machines */
can_suspend = TRUE;
}
@@ -532,6 +534,7 @@ detect_openfirmware_formfactor(HalDevice
{ "AAPL" , "desktop" },
{ "iMac" , "desktop" },
{ "PowerMac" , "desktop" },
+ { "Pegasos" , "desktop" },
{NULL, NULL }
};
const gchar *model =
More information about the hal-commit
mailing list