diff options
author | David Woodhouse <dwmw2@redhat.com> | 2006-10-03 11:57:51 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2006-10-03 11:59:50 -0400 |
commit | 7c240196eae1cce8bf511dffaa7019e08383d1fb (patch) | |
tree | d5406961c424295fa83c4dd581ffdefa94242284 | |
parent | 5cbbf1ca4fa93483373186c7a33eff02761137d8 (diff) |
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)
-rw-r--r-- | hald/linux/osspec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hald/linux/osspec.c b/hald/linux/osspec.c index 1b322bb2..31ef4988 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 *root) { "AAPL" , "desktop" }, { "iMac" , "desktop" }, { "PowerMac" , "desktop" }, + { "Pegasos" , "desktop" }, {NULL, NULL } }; const gchar *model = |