[Pkg-utopia-commits] r620 - packages/experimental/hal/debian/patches

Sjoerd Simons sjoerd at costa.debian.org
Mon Feb 20 21:48:56 UTC 2006


Author: sjoerd
Date: 2006-02-20 21:48:55 +0000 (Mon, 20 Feb 2006)
New Revision: 620

Added:
   packages/experimental/hal/debian/patches/05_pmu_nohibernate.patch
Modified:
   packages/experimental/hal/debian/patches/04_hald_scripts.patch
Log:
Updated debian/patches/04_hald_scripts.patch

Modified: packages/experimental/hal/debian/patches/04_hald_scripts.patch
===================================================================
--- packages/experimental/hal/debian/patches/04_hald_scripts.patch	2006-02-20 15:51:42 UTC (rev 619)
+++ packages/experimental/hal/debian/patches/04_hald_scripts.patch	2006-02-20 21:48:55 UTC (rev 620)
@@ -4,7 +4,7 @@
 retrieving revision 1.7
 diff -u -r1.7 hal-system-lcd-get-brightness
 --- tools/hal-system-lcd-get-brightness	18 Feb 2006 23:11:23 -0000	1.7
-+++ tools/hal-system-lcd-get-brightness	19 Feb 2006 22:39:22 -0000
++++ tools/hal-system-lcd-get-brightness	19 Feb 2006 22:44:22 -0000
 @@ -8,13 +8,13 @@
  # (at your option) any later version.
  
@@ -72,7 +72,7 @@
 retrieving revision 1.7
 diff -u -r1.7 hal-system-lcd-set-brightness
 --- tools/hal-system-lcd-set-brightness	18 Feb 2006 23:11:23 -0000	1.7
-+++ tools/hal-system-lcd-set-brightness	19 Feb 2006 22:39:22 -0000
++++ tools/hal-system-lcd-set-brightness	19 Feb 2006 22:44:23 -0000
 @@ -8,8 +8,8 @@
  # (at your option) any later version.
  
@@ -153,7 +153,7 @@
 retrieving revision 1.6
 diff -u -r1.6 hal-system-power-hibernate
 --- tools/hal-system-power-hibernate	16 Jan 2006 12:47:40 -0000	1.6
-+++ tools/hal-system-power-hibernate	19 Feb 2006 22:39:22 -0000
++++ tools/hal-system-power-hibernate	19 Feb 2006 22:44:23 -0000
 @@ -43,8 +43,9 @@
  		# Suspend2 tools installed
  		/usr/sbin/hibernate --force
@@ -172,22 +172,40 @@
 retrieving revision 1.6
 diff -u -r1.6 hal-system-power-suspend
 --- tools/hal-system-power-suspend	18 Feb 2006 23:00:55 -0000	1.6
-+++ tools/hal-system-power-suspend	19 Feb 2006 22:39:22 -0000
-@@ -19,7 +19,7 @@
++++ tools/hal-system-power-suspend	19 Feb 2006 22:44:23 -0000
+@@ -18,15 +18,6 @@
+ 
  read seconds_to_sleep
  
- #PMU systems cannot use /sys/power/state yet, so use a helper to issue an ioctl
+-#PMU systems cannot use /sys/power/state yet, so use a helper to issue an ioctl
 -if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "pmu" ]; then
-+if [ "$HAL_PROP_POWER_MANAGEMENT_TYPE" = "pmu" ]; then
- 	hal-system-power-pmu sleep
- 	if [ $? -ne 0 ]; then
- 		echo "org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported" >&2
-@@ -27,6 +27,8 @@
- 	fi
- 	exit 0
- fi
-+env > /tmp/output
-+unsupported
+-	hal-system-power-pmu sleep
+-	if [ $? -ne 0 ]; then
+-		echo "org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported" >&2
+-		exit 1
+-	fi
+-	exit 0
+-fi
  
  #SuSE and ALTLinux only support powersave
  if [ -f "/etc/altlinux-release" ] || [ -f "/etc/SuSE-release" ] ; then
+@@ -62,6 +53,10 @@
+ 	elif [ -x "/usr/sbin/pmi" ] ; then
+ 	    /usr/sbin/pmi action suspend force
+ 	    RET=$?
++	elif  [ "$HAL_PROP_POWER_MANAGEMENT_TYPE" = "pmu" ]; then
++		#PMU systems cannot use /sys/power/state yet, so use a helper to issue an ioctl
++		hal-system-power-pmu sleep
++		RET=$?
+ 	elif [ -w "/sys/power/state" ] ; then
+ 	    # Use the raw kernel sysfs interface
+ 	    echo "mem" > /sys/power/state
+@@ -72,4 +67,8 @@
+ 	    fi
+ 	fi
+ 
++if [ $RET -ne 0 ]; then
++	echo "org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported" >&2
++	exit 1
++fi
+ exit $RET

Added: packages/experimental/hal/debian/patches/05_pmu_nohibernate.patch
===================================================================
--- packages/experimental/hal/debian/patches/05_pmu_nohibernate.patch	2006-02-20 15:51:42 UTC (rev 619)
+++ packages/experimental/hal/debian/patches/05_pmu_nohibernate.patch	2006-02-20 21:48:55 UTC (rev 620)
@@ -0,0 +1,23 @@
+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 @@
+ 		can_hibernate = TRUE;
+ 	free (poweroptions);
+ 
++	if (!strcmp(hal_device_property_get_string(d,"power_management.type"), "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...
++		 * Should be removed as soon as /sys/power works on PMU */
++		can_hibernate = FALSE;
++		can_suspend = TRUE;
++	}
++
+ 	/* check for the presence of suspend2 */
+ 	if (access ("/proc/software_suspend", F_OK) == 0)
+ 		can_hibernate = TRUE;




More information about the Pkg-utopia-commits mailing list