hal: Branch 'master' - 3 commits

Richard Hughes hughsient at kemper.freedesktop.org
Tue Feb 20 12:55:49 PST 2007


 doc/api/.gitignore                           |    1 
 doc/spec/.gitignore                          |    1 
 doc/spec/Makefile.am                         |   39 +++++++++++++--------------
 tools/linux/hal-system-power-hibernate-linux |   17 ++++++++++-
 tools/linux/hal-system-power-suspend-linux   |   19 +++++++++++--
 5 files changed, 52 insertions(+), 25 deletions(-)

New commits:
diff-tree 5845d62c44246292d7c083ea2ea46a3322d482cd (from b40dcd58b29efc7d5fb91121a08e48677d8944be)
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Feb 20 20:55:11 2007 +0000

    remove bak files from git-status output
    
    .bak files show up everytime the docbook is regenerated. Ignore them.

diff --git a/doc/api/.gitignore b/doc/api/.gitignore
index bffaf95..cc347ad 100644
--- a/doc/api/.gitignore
+++ b/doc/api/.gitignore
@@ -8,6 +8,7 @@ hal.interfaces
 hal.prerequisites
 hal.signals
 *.txt
+*.bak
 *.args
 *.stamp
 *.o
diff-tree b40dcd58b29efc7d5fb91121a08e48677d8944be (from 273d1dba0685772ca037063a6cfc4c6cb89438e9)
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Feb 20 20:53:22 2007 +0000

    remove hal-spec.html from the tarball
    
    On Tue, 2007-02-20 at 01:11 -0500, David Zeuthen wrote:
    > as it rendered the commit logs virtually unreadable. Downside is that
    > it's a bit harder to look at the current spec but we ought to solve
    > that
    > in other ways.
    >
    > Btw, feel free to commit a fix for this. Thanks :-)
    
    Well, we have two options:
    
    1. Force anybody that does make distcheck to use --enable-docbook-docs
    so that the html file gets created.
    2. Remove the html from the tarball
    
    I personally think that the hal spec should be a static html file on the
    hal fd.o page (and therefore removed from the tarball), or created using
    a post-commit hook as Rob suggested.
    
    Richard.

diff --git a/doc/spec/.gitignore b/doc/spec/.gitignore
index f9f6e10..7dfba52 100644
--- a/doc/spec/.gitignore
+++ b/doc/spec/.gitignore
@@ -1,5 +1,6 @@
 Makefile
 Makefile.in
 hal-spec.xml
+hal-spec.html
 *.o
 *~
diff --git a/doc/spec/Makefile.am b/doc/spec/Makefile.am
index 65d0772..8d69843 100644
--- a/doc/spec/Makefile.am
+++ b/doc/spec/Makefile.am
@@ -1,16 +1,16 @@
 
-FIGURE_FILES =                  \
-	hal-arch.png            \
-	hal-devices1.png        \
-	hal-fdi-example1.png    \
-	hal-fdi-example2.png    \
-	hal-fdi-example3.png	\
+FIGURE_FILES =				\
+	hal-arch.png			\
+	hal-devices1.png		\
+	hal-fdi-example1.png		\
+	hal-fdi-example2.png		\
+	hal-fdi-example3.png		\
 	hal-linux26.png	
 
-SPEC_XML_EXTRA_FILES =                    \
-	hal-spec-examples.xml       \
-	hal-spec-introduction.xml   \
-	hal-spec-fdi-files.xml      \
+SPEC_XML_EXTRA_FILES =			\
+	hal-spec-examples.xml		\
+	hal-spec-introduction.xml	\
+	hal-spec-fdi-files.xml		\
 	hal-spec-properties.xml
 
 if DOCBOOK_DOCS_ENABLED
@@ -29,13 +29,12 @@ clean-local:
 
 endif # DOCBOOK_DOCS_ENABLED
 
-EXTRA_DIST =              \
-  hal-spec.html           \
-  hal-spec.xml.in         \
-  config.xsl              \
-  docbook.css             \
-  $(SPEC_XML_EXTRA_FILES) \
-  example-manager.py	  \
-  hal-arch.dia	          \
-  hal-linux26.dia         \
-  $(FIGURE_FILES)
+EXTRA_DIST =				\
+	hal-spec.xml.in			\
+	config.xsl			\
+	docbook.css			\
+	$(SPEC_XML_EXTRA_FILES)		\
+	example-manager.py		\
+	hal-arch.dia			\
+	hal-linux26.dia			\
+	$(FIGURE_FILES)
diff-tree 273d1dba0685772ca037063a6cfc4c6cb89438e9 (from a738fb6d5156e8ab4d1cdfc85d4f413e7204812c)
Author: Richard Hughes <richard at hughsie.com>
Date:   Tue Feb 20 20:50:05 2007 +0000

    make the hal suspend and hibernate scripts use the quirk command line of pm-utils
    
    On Tue, 2007-02-20 at 00:59 -0500, David Zeuthen wrote:
    >  1. Need a pm-utils release and the associated glue for HAL. Richard,
    >     can you drive this one (I can throw staplers at Peter if needed)?
    >     Thanks! This is a release blocker.
    
    Attached patches (to pm-utils and HAL) propagate the quirk information
    onto the tools via the command line.
    
    Lightly tested by me.
    
    Richard.
    
    p.s. Throw the stapler now.

diff --git a/tools/linux/hal-system-power-hibernate-linux b/tools/linux/hal-system-power-hibernate-linux
index 632acb6..d17a8e8 100755
--- a/tools/linux/hal-system-power-hibernate-linux
+++ b/tools/linux/hal-system-power-hibernate-linux
@@ -10,6 +10,19 @@ unsupported() {
 	exit 1
 }
 
+# Make a suitable command line argument so that the tools can do the correct
+# quirks for video resume.
+# Passing the quirks to the tool allows the tool to not depend on HAL for data.
+QUIRKS=""
+[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_S3_BIOS" = "true" ] && QUIRKS="$QUIRKS --quirk-s3-bios"
+[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_S3_MODE" = "true" ] && QUIRKS="$QUIRKS --quirk-s3-mode"
+[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_DPMS_SUSPEND" = "true" ] && QUIRKS="$QUIRKS --quirk-dpms-suspend"
+[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_DPMS_ON" = "true" ] && QUIRKS="$QUIRKS --quirk-dpms-on"
+[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBESTATE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbestate"
+[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBEMODE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbemode"
+[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VGA_MODE_3" = "true" ] && QUIRKS="$QUIRKS --quirk-vga-mode3"
+[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBE_POST" = "true" ] && QUIRKS="$QUIRKS --quirk-vbepost"
+
 #ALTLinux only supports powersave
 if [ -f /etc/altlinux-release ] ; then
 	if [ -x /usr/bin/powersave ] ; then
@@ -32,7 +45,7 @@ elif [ -f /etc/mandriva-release ] ; then
 elif [ -f /etc/redhat-release ] || [ -f /etc/fedora-release ] \
 		 || [ -f "/etc/SuSE-release" ] ; then
 	if [ -x /usr/sbin/pm-hibernate ] ; then
-		/usr/sbin/pm-hibernate
+		/usr/sbin/pm-hibernate $QUIRKS
 		RET=$?
 	else
 		unsupported
@@ -47,7 +60,7 @@ else
 		/usr/sbin/pmi action hibernate force
 		RET=$?
 	elif [ -x "/usr/sbin/pm-hibernate" ] ; then
-		/usr/sbin/pm-hibernate
+		/usr/sbin/pm-hibernate $QUIRKS
 		RET=$?
 	elif [ -x "/usr/sbin/hibernate" ] ; then
 		# Suspend2 tools installed
diff --git a/tools/linux/hal-system-power-suspend-linux b/tools/linux/hal-system-power-suspend-linux
index 180d4a1..d5ae5f2 100755
--- a/tools/linux/hal-system-power-suspend-linux
+++ b/tools/linux/hal-system-power-suspend-linux
@@ -18,8 +18,21 @@ unsupported() {
 
 read seconds_to_sleep
 
+# Make a suitable command line argument so that the tools can do the correct
+# quirks for video resume.
+# Passing the quirks to the tool allows the tool to not depend on HAL for data.
+QUIRKS=""
+[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_S3_BIOS" = "true" ] && QUIRKS="$QUIRKS --quirk-s3-bios"
+[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_S3_MODE" = "true" ] && QUIRKS="$QUIRKS --quirk-s3-mode"
+[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_DPMS_SUSPEND" = "true" ] && QUIRKS="$QUIRKS --quirk-dpms-suspend"
+[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_DPMS_ON" = "true" ] && QUIRKS="$QUIRKS --quirk-dpms-on"
+[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBESTATE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbestate"
+[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBEMODE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbemode"
+[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VGA_MODE_3" = "true" ] && QUIRKS="$QUIRKS --quirk-vga-mode3"
+[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBE_POST" = "true" ] && QUIRKS="$QUIRKS --quirk-vbepost"
+
 #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_LAPTOP_PANEL_ACCESS_METHOD" = "pmu" ]; then
 	hal-system-power-pmu sleep
 	if [ $? -ne 0 ]; then
 		echo "org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported" >&2
@@ -63,7 +76,7 @@ elif [ -f "/etc/redhat-release" ] || [ -
 	# TODO: fixup pm-suspend to define erroc code (see alarm above) and throw
 	#	   the appropriate exception
 	if [ -x "/usr/sbin/pm-suspend" ] ; then
-		/usr/sbin/pm-suspend
+		/usr/sbin/pm-suspend $QUIRKS
 		RET=$?
 	else
 		# TODO: add support
@@ -88,7 +101,7 @@ else
 	    /usr/sbin/pmi action suspend force
 	    RET=$?
 	elif [ -x "/usr/sbin/pm-suspend" ] ; then
-		/usr/sbin/pm-suspend
+		/usr/sbin/pm-suspend $QUIRKS
 		RET=$?
 	elif [ -w "/sys/power/state" ] ; then
 	    # Use the raw kernel sysfs interface


More information about the hal-commit mailing list