[Pkg-utopia-commits] r685 - in packages/experimental/hal/debian: . patches

Sjoerd Simons sjoerd at costa.debian.org
Wed Mar 1 14:09:17 UTC 2006


Author: sjoerd
Date: 2006-03-01 14:09:16 +0000 (Wed, 01 Mar 2006)
New Revision: 685

Modified:
   packages/experimental/hal/debian/changelog
   packages/experimental/hal/debian/patches/05_pmu_nohibernate.patch
Log:
Fix crash when power_management.type is not set

Modified: packages/experimental/hal/debian/changelog
===================================================================
--- packages/experimental/hal/debian/changelog	2006-03-01 13:50:01 UTC (rev 684)
+++ packages/experimental/hal/debian/changelog	2006-03-01 14:09:16 UTC (rev 685)
@@ -5,11 +5,14 @@
     + Removed. Fixed upstream
   * debian/patches/03_hald_runnerpath.patch
     + Removed. Fixed upstream
+  * debian/patches/05_pmu_nohibernate.patch 
+    + Updated. Fix crash when power_management.type is not set (Thanks Martin
+      Pitt)
   * debian/patches/06_more_buttons.patch
-    + Added. Also recognize mute, volume up/down buttons, 
+    + Added. Also recognize mute, volume up/down buttons,
       switchvideo mode button and keyboard illumination toggle/down/up buttons.
 
- -- Sjoerd Simons <sjoerd at debian.org>  Wed,  1 Mar 2006 14:48:58 +0100
+ -- Sjoerd Simons <sjoerd at debian.org>  Wed,  1 Mar 2006 15:08:08 +0100
 
 hal (0.5.6+cvs20060219-1) experimental; urgency=low
 

Modified: packages/experimental/hal/debian/patches/05_pmu_nohibernate.patch
===================================================================
--- packages/experimental/hal/debian/patches/05_pmu_nohibernate.patch	2006-03-01 13:50:01 UTC (rev 684)
+++ packages/experimental/hal/debian/patches/05_pmu_nohibernate.patch	2006-03-01 14:09:16 UTC (rev 685)
@@ -1,15 +1,20 @@
-Index: hald/linux2/osspec.c
-===================================================================
-RCS file: /cvs/hal/hal/hald/linux2/osspec.c,v
-retrieving revision 1.45
-diff -u -r1.45 osspec.c
---- hald/linux2/osspec.c	13 Feb 2006 16:42:32 -0000	1.45
-+++ hald/linux2/osspec.c	19 Feb 2006 23:19:47 -0000
-@@ -471,6 +471,15 @@
+diff -ruN hal-0.5.7-old/hald/linux2/osspec.c hal-0.5.7/hald/linux2/osspec.c
+--- hal-0.5.7-old/hald/linux2/osspec.c	2006-02-13 17:42:32.000000000 +0100
++++ hal-0.5.7/hald/linux2/osspec.c	2006-03-01 15:05:55.000000000 +0100
+@@ -447,6 +447,7 @@
+ 	unsigned int len;
+ 	char *poweroptions;
+ 	FILE *fp;
++        const char* pmtype = NULL;
+ 
+ 	can_suspend = FALSE;
+ 	can_hibernate = FALSE;
+@@ -471,6 +472,16 @@
  		can_hibernate = TRUE;
  	free (poweroptions);
  
-+	if (!strcmp(hal_device_property_get_string(d,"power_management.type"), "pmu")) {
++        pmtype = hal_device_property_get_string(d,"power_management.type");
++	if (pmtype && !strcmp(pmtype, "pmu")) {
 +		/* Although /sys/power/state exists on pmu based machines, using it just
 +		 * crashes mine. Suspending works via the pmu though. So overriding what we
 +		 * just saw...
@@ -21,3 +26,27 @@
  	/* check for the presence of suspend2 */
  	if (access ("/proc/software_suspend", F_OK) == 0)
  		can_hibernate = TRUE;
+diff -ruN hal-0.5.7-old/pmucrash.patch hal-0.5.7/pmucrash.patch
+--- hal-0.5.7-old/pmucrash.patch	1970-01-01 01:00:00.000000000 +0100
++++ hal-0.5.7/pmucrash.patch	2006-03-01 11:36:19.000000000 +0100
+@@ -0,0 +1,20 @@
++--- osspec.c.orig	2006-03-01 11:32:31.000000000 +0100
+++++ osspec.c	2006-03-01 11:35:56.000000000 +0100
++@@ -447,6 +447,7 @@
++ 	unsigned int len;
++ 	char *poweroptions;
++ 	FILE *fp;
+++        const char* pmtype = NULL;
++ 
++ 	can_suspend = FALSE;
++ 	can_hibernate = FALSE;
++@@ -471,7 +472,8 @@
++ 		can_hibernate = TRUE;
++ 	free (poweroptions);
++ 
++-	if (!strcmp(hal_device_property_get_string(d,"power_management.type"), "pmu")) {
+++        pmtype = hal_device_property_get_string(d,"power_management.type");
+++	if (pmtype && !strcmp(pmtype, "pmu")) {
++ 		/* Although /sys/power/state exists on pmu based machines, using it just
++ 		 * crashes mine. Suspending works via the pmu though. So overriding what we
++ 		 * just saw...




More information about the Pkg-utopia-commits mailing list