Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 190483 Details for
Bug 268133
sys-power/hibernate-script-2.0 Making USuspendRam* Options available for s2both
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
hibernate-script-2.0-USuspendBothForce.patch
hibernate-script-2.0-USuspendBothForce.patch (text/plain), 3.07 KB, created by
samLT
on 2009-05-06 08:34:01 UTC
(
hide
)
Description:
hibernate-script-2.0-USuspendBothForce.patch
Filename:
MIME Type:
Creator:
samLT
Created:
2009-05-06 08:34:01 UTC
Size:
3.07 KB
patch
obsolete
>diff -Narup hibernate-script-2.0.old/scriptlets.d/ususpend hibernate-script-2.0/scriptlets.d/ususpend >--- hibernate-script-2.0.old/scriptlets.d/ususpend 2009-05-05 22:50:24.657966257 +0200 >+++ hibernate-script-2.0/scriptlets.d/ususpend 2009-05-06 08:08:07.386938637 +0200 >@@ -5,6 +5,7 @@ AddConfigHandler USuspendConfigEnabler > AddOptionHandler USuspendOptionHandler > > AddConfigHelp "USuspendMethod <disk|ram|both>" "Enables use of the uswsusp suspend method of newer kernels (>= 2.6.17rc1)" >+AddConfigHelp "USuspendBothForce <boolean>" "Passes the --force flag to s2both to force suspending even if the machine is not recognised (s2ram -n)" > AddConfigHelp "USuspendRamForce <boolean>" "Passes the -f flag to s2ram to force suspending even if the machine is not recognised" > AddConfigHelp "USuspendRamUnsureOk <boolean>" "Instructs s2ram to continue when it's unsure about the system type, thus not requiring -f to be passed" > AddConfigHelp "USuspendRamVbeSave <boolean>" "Passes the -s flag to s2ram to save VBE state before suspending and restore after resume" >@@ -20,6 +21,7 @@ AddLongOption "no-suspend" > USUSPEND_STATE_FILE=/sys/power/state > USUSPEND_DEVICE=/dev/snapshot > USUSPEND_PROG=s2disk >+USUSPEND_BOTH_FORCE=0 > USUSPEND_RAM_FORCE=0 > USUSPEND_RAM_UNSUREOK=0 > USUSPEND_RAM_VBESAVE=0 >@@ -52,6 +54,9 @@ USuspendConfigEnabler() { > fi > ;; > >+ ususpendbothforce) >+ BoolIsOn "$1" "$2" && USUSPEND_BOTH_FORCE=1 || return 0 >+ ;; > ususpendramforce) > BoolIsOn "$1" "$2" && USUSPEND_RAM_FORCE=1 || return 0 > ;; >@@ -104,6 +109,9 @@ USuspendOptionHandler() { > DoUSuspend() { > if [ -z "$USUSPEND_NO_SUSPEND" ] ; then > ARGS= >+ if [ "$USUSPEND_PROG" = s2both ]; then >+ [ $USUSPEND_BOTH_FORCE -eq 1 ] && ARGS="$ARGS --force" >+ fi > if [ "$USUSPEND_PROG" = s2ram ]; then > [ $USUSPEND_RAM_FORCE -eq 1 ] && ARGS="$ARGS -f" > [ $USUSPEND_RAM_VBESAVE -eq 1 ] && ARGS="$ARGS -s" >@@ -127,8 +135,9 @@ EnsureUSuspendCapable() { > vecho 0 "$USUSPEND_PROG not installed." > return 2 > fi >- if [ "$USUSPEND_PROG" = s2ram ] && [ $USUSPEND_RAM_FORCE -eq 0 ]; then >- $USUSPEND_PROG -n >/dev/null >+ if [ "$USUSPEND_PROG" = s2ram ] && [ $USUSPEND_RAM_FORCE -eq 0 ] || \ >+ [ "$USUSPEND_PROG" = s2both ] && [ $USUSPEND_BOTH_FORCE -eq 0 ]; then >+ s2ram -n >/dev/null > ret=$? > case "$ret/$USUSPEND_RAM_UNSUREOK" in > 0/*) :;; >@@ -138,7 +147,7 @@ EnsureUSuspendCapable() { > return 2 > ;; > *) >- vecho 0 "$USUSPEND_PROG: unknown machine, see s2ram(8) and the USuspendRamForce option" >+ vecho 0 "$USUSPEND_PROG: unknown machine, see s2ram(8) and the USuspendRamForce and UsuspendBothForce options" > return 2 > ;; > esac >diff -Narup hibernate-script-2.0.old/ususpend-both.conf hibernate-script-2.0/ususpend-both.conf >--- hibernate-script-2.0.old/ususpend-both.conf 2009-05-05 22:50:24.653220121 +0200 >+++ hibernate-script-2.0/ususpend-both.conf 2009-05-06 08:05:50.595961383 +0200 >@@ -9,4 +9,8 @@ > > USuspendMethod both > >+## if needed, pass the --force option to s2both - typically when s2ram also needs >+## this option (machine unknown) - >+# USuspendBothForce yes >+ > Include common.conf
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 268133
:
190480
|
190481
|
190483
|
190520
|
190521
|
190523
|
190633