hal/tools Makefile.am, 1.32, 1.33 hal-system-lcd-get-brightness, 1.5, 1.6 hal-system-lcd-set-brightness, 1.5, 1.6 hal-system-power-suspend, 1.5, 1.6

Richard Hughes hughsient at freedesktop.org
Sat Feb 18 15:00:57 PST 2006


Update of /cvs/hal/hal/tools
In directory gabe:/tmp/cvs-serv16347/tools

Modified Files:
	Makefile.am hal-system-lcd-get-brightness 
	hal-system-lcd-set-brightness hal-system-power-suspend 
Log Message:
2006-02-18  Richard Hughes <richard at hughsie.com>

* tools/Makefile.am: Move hal-system-power-pmu from bin to libexec as it's only meant to be called by hal, not a user.

* tools/hal-system-lcd-get-brightness, 	tools/hal-system-lcd-set-brightness: Change the path of hal-system-power-pmu as libexec is now in our path and we are not installed in scripts anymore.

* tools/hal-system-power-suspend: Add the sleep command for hal-system-power-pmu so that suspend works on ppc hardware.


Index: Makefile.am
===================================================================
RCS file: /cvs/hal/hal/tools/Makefile.am,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- Makefile.am	13 Feb 2006 07:29:44 -0000	1.32
+++ Makefile.am	18 Feb 2006 23:00:55 -0000	1.33
@@ -11,7 +11,6 @@
 
 bin_PROGRAMS = \
 	lshal \
-	hal-system-power-pmu \
 	hal-get-property \
 	hal-set-property \
 	hal-find-by-capability \
@@ -21,9 +20,6 @@
 lshal_SOURCES = lshal.c
 lshal_LDADD = @PACKAGE_LIBS@ $(top_builddir)/libhal/libhal.la
 
-hal_system_power_pmu_SOURCES = hal-system-power-pmu.c
-hal_system_power_pmu_LDADD = @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la
-
 hal_get_property_SOURCES = hal_get_property.c
 hal_get_property_LDADD = @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la
 
@@ -39,6 +35,11 @@
 hal_device_SOURCES = hal-device.c
 hal_device_LDADD = @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la
 
+libexec_PROGRAMS = hal-system-power-pmu
+
+hal_system_power_pmu_SOURCES = hal-system-power-pmu.c
+hal_system_power_pmu_LDADD = @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la
+
 scriptdir = $(datadir)/hal/scripts
 
 script_SCRIPTS =				\

Index: hal-system-lcd-get-brightness
===================================================================
RCS file: /cvs/hal/hal/tools/hal-system-lcd-get-brightness,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- hal-system-lcd-get-brightness	29 Jan 2006 17:07:54 -0000	1.5
+++ hal-system-lcd-get-brightness	18 Feb 2006 23:00:55 -0000	1.6
@@ -15,7 +15,7 @@
 fi
 
 if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "pmu" ]; then
-	value="`./hal-system-power-pmu getlcd`"
+	value="`hal-system-power-pmu getlcd`"
 	if [ $? -ne 0 ]; then
 		echo "org.freedesktop.Hal.Device.LaptopPanel.NotSupported" >&2
 		exit 1

Index: hal-system-lcd-set-brightness
===================================================================
RCS file: /cvs/hal/hal/tools/hal-system-lcd-set-brightness,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- hal-system-lcd-set-brightness	29 Jan 2006 17:07:54 -0000	1.5
+++ hal-system-lcd-set-brightness	18 Feb 2006 23:00:55 -0000	1.6
@@ -19,7 +19,7 @@
 read value
 
 if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" == "pmu" ]; then
-	./hal-system-power-pmu setlcd $value
+	hal-system-power-pmu setlcd $value
 	if [ $? -ne 0 ]; then
 		echo "org.freedesktop.Hal.Device.LaptopPanel.NotSupported" >&2
 		exit 1

Index: hal-system-power-suspend
===================================================================
RCS file: /cvs/hal/hal/tools/hal-system-power-suspend,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- hal-system-power-suspend	16 Jan 2006 12:47:40 -0000	1.5
+++ hal-system-power-suspend	18 Feb 2006 23:00:55 -0000	1.6
@@ -18,6 +18,16 @@
 
 read seconds_to_sleep
 
+#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
+	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
 	if [ -x /usr/bin/powersave ] ; then




More information about the hal-commit mailing list