summaryrefslogtreecommitdiffstats
path: root/source/ap/pm-utils/patches
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/ap/pm-utils/patches/add-in-kernel-suspend-to-both.patch32
-rw-r--r--source/ap/pm-utils/patches/fix-wrong-path-in-intel-audio-powersave.patch (renamed from source/ap/pm-utils/fix-wrong-path-in-intel-audio-powersave.patch)0
-rw-r--r--source/ap/pm-utils/patches/hook-exit-code-log.patch19
-rw-r--r--source/ap/pm-utils/patches/init-logfile-append.patch13
-rw-r--r--source/ap/pm-utils/patches/log-line-spacing-fix.patch14
-rw-r--r--source/ap/pm-utils/patches/use_more_sane_harddrive_defaults.patch (renamed from source/ap/pm-utils/use_more_sane_harddrive_defaults.patch)0
6 files changed, 78 insertions, 0 deletions
diff --git a/source/ap/pm-utils/patches/add-in-kernel-suspend-to-both.patch b/source/ap/pm-utils/patches/add-in-kernel-suspend-to-both.patch
new file mode 100644
index 000000000..e09d07669
--- /dev/null
+++ b/source/ap/pm-utils/patches/add-in-kernel-suspend-to-both.patch
@@ -0,0 +1,32 @@
+diff --git a/pm/pm-functions.in b/pm/pm-functions.in
+--- a/pm/pm-functions.in
++++ b/pm/pm-functions.in
+@@ -316,8 +316,28 @@ if [ -z "$HIBERNATE_MODULE" ] && \
+ {
+ [ -n "${HIBERNATE_MODE}" ] && \
+ grep -qw "${HIBERNATE_MODE}" /sys/power/disk && \
++ HIBERNATE_MODE_SAVE=$(cat /sys/power/disk) && \
++ HIBERNATE_MODE_SAVE="${HIBERNATE_MODE_SAVE##*[}" && \
++ HIBERNATE_MODE_SAVE="${HIBERNATE_MODE_SAVE%%]*}" && \
+ echo -n "${HIBERNATE_MODE}" > /sys/power/disk
+ echo -n "disk" > /sys/power/state
++ RET=$?
++ echo -n "$HIBERNATE_MODE_SAVE" > /sys/power/disk
++ return "$RET"
++ }
++fi
++
++# for kernels that support suspend to both (i.e. hybrid suspend)
++# since kernel 3.6
++if [ -z "$SUSPEND_HYBRID_MODULE" ] && \
++ [ -f /sys/power/disk ] && \
++ grep -q disk /sys/power/state && \
++ grep -q suspend /sys/power/disk; then
++ SUSPEND_HYBRID_MODULE="kernel"
++ do_suspend_hybrid()
++ {
++ HIBERNATE_MODE="suspend"
++ do_hibernate
+ }
+ fi
+
diff --git a/source/ap/pm-utils/fix-wrong-path-in-intel-audio-powersave.patch b/source/ap/pm-utils/patches/fix-wrong-path-in-intel-audio-powersave.patch
index 900397106..900397106 100644
--- a/source/ap/pm-utils/fix-wrong-path-in-intel-audio-powersave.patch
+++ b/source/ap/pm-utils/patches/fix-wrong-path-in-intel-audio-powersave.patch
diff --git a/source/ap/pm-utils/patches/hook-exit-code-log.patch b/source/ap/pm-utils/patches/hook-exit-code-log.patch
new file mode 100644
index 000000000..7eccd83b0
--- /dev/null
+++ b/source/ap/pm-utils/patches/hook-exit-code-log.patch
@@ -0,0 +1,19 @@
+diff -up pm-utils-1.4.1/pm/pm-functions.in.orig pm-utils-1.4.1/pm/pm-functions.in
+--- pm-utils-1.4.1/pm/pm-functions.in.orig 2011-08-22 14:52:58.976213050 +0200
++++ pm-utils-1.4.1/pm/pm-functions.in 2011-08-22 14:57:26.000000000 +0200
+@@ -195,11 +195,13 @@ hook_ok()
+ _run_hook() {
+ # $1 = hook to run
+ # rest of args passed to hook unchanged.
++ local hook_status
+ log "Running hook $*:"
+ hook_ok "$1" && "$@"
++ hook_status=$?
+ log ""
+- log -n "$*: "
+- hook_exit_status $? && LAST_HOOK="${1##*/}" || inhibit
++ log -n "$*: "
++ hook_exit_status $hook_status && LAST_HOOK="${1##*/}" || inhibit
+ }
+
+ if profiling; then
diff --git a/source/ap/pm-utils/patches/init-logfile-append.patch b/source/ap/pm-utils/patches/init-logfile-append.patch
new file mode 100644
index 000000000..079782630
--- /dev/null
+++ b/source/ap/pm-utils/patches/init-logfile-append.patch
@@ -0,0 +1,13 @@
+--- pm-utils-1.4.1/pm/pm-functions.in.old 2010-07-04 16:50:13.000000000 +0200
++++ pm-utils-1.4.1/pm/pm-functions.in 2010-12-07 16:48:39.555074652 +0100
+@@ -271,7 +271,9 @@
+ return 1
+ fi
+ export LOGGING=true
+- exec > "$1" 2>&1
++ rm -f "$1"
++ touch "$1"
++ exec >> "$1" 2>&1
+ }
+
+ check_suspend() { [ -n "$SUSPEND_MODULE" ]; }
diff --git a/source/ap/pm-utils/patches/log-line-spacing-fix.patch b/source/ap/pm-utils/patches/log-line-spacing-fix.patch
new file mode 100644
index 000000000..cf4fbe382
--- /dev/null
+++ b/source/ap/pm-utils/patches/log-line-spacing-fix.patch
@@ -0,0 +1,14 @@
+diff -up pm-utils-1.4.1/pm/pm-functions.in.orig pm-utils-1.4.1/pm/pm-functions.in
+--- pm-utils-1.4.1/pm/pm-functions.in.orig 2011-11-02 11:43:24.000000000 +0100
++++ pm-utils-1.4.1/pm/pm-functions.in 2011-11-02 11:43:49.987116603 +0100
+@@ -199,9 +199,9 @@ _run_hook() {
+ log "Running hook $*:"
+ hook_ok "$1" && "$@"
+ hook_status=$?
+- log ""
+ log -n "$*: "
+ hook_exit_status $hook_status && LAST_HOOK="${1##*/}" || inhibit
++ log ""
+ }
+
+ if profiling; then
diff --git a/source/ap/pm-utils/use_more_sane_harddrive_defaults.patch b/source/ap/pm-utils/patches/use_more_sane_harddrive_defaults.patch
index 3dcc81566..3dcc81566 100644
--- a/source/ap/pm-utils/use_more_sane_harddrive_defaults.patch
+++ b/source/ap/pm-utils/patches/use_more_sane_harddrive_defaults.patch