diff options
author | Victor Lowther <victor.lowther@gmail.com> | 2008-04-30 22:27:25 -0500 |
---|---|---|
committer | Victor Lowther <victor.lowther@gmail.com> | 2008-04-30 22:27:25 -0500 |
commit | ddbee7518ba53ab2161934bcdc4eea0394a27371 (patch) | |
tree | ee5d4fb40393f761c9cb719d67a497db8765f2b9 /pm | |
parent | 2d7fce602129abb1ce0590cd00637375a3423a62 (diff) |
Simplify implementation of check_suspend a bit.
Why use 4 commands where 2 will do?
Diffstat (limited to 'pm')
-rwxr-xr-x | pm/module.d/kernel | 3 | ||||
-rwxr-xr-x | pm/module.d/tuxonice | 3 | ||||
-rwxr-xr-x | pm/module.d/uswsusp | 3 |
3 files changed, 3 insertions, 6 deletions
diff --git a/pm/module.d/kernel b/pm/module.d/kernel index 3aedad5..88a9e5d 100755 --- a/pm/module.d/kernel +++ b/pm/module.d/kernel @@ -2,8 +2,7 @@ check_suspend() { - [ -c /dev/pmu ] && return 0 - grep -q mem /sys/power/state && return 0 + [ -c /dev/pmu ] || grep -q mem /sys/power/state } do_suspend() diff --git a/pm/module.d/tuxonice b/pm/module.d/tuxonice index e0c95aa..32d7584 100755 --- a/pm/module.d/tuxonice +++ b/pm/module.d/tuxonice @@ -13,8 +13,7 @@ done check_suspend() { - [ -c /dev/pmu ] && return 0 - grep -q mem /sys/power/state && return 0 + [ -c /dev/pmu ] || grep -q mem /sys/power/state } do_suspend() diff --git a/pm/module.d/uswsusp b/pm/module.d/uswsusp index 8a5ee3b..c89f31b 100755 --- a/pm/module.d/uswsusp +++ b/pm/module.d/uswsusp @@ -36,8 +36,7 @@ get_quirks() check_suspend() { command_exists s2ram || return 1 - [ -c /dev/pmu ] && return 0 - grep -q mem /sys/power/state && return 0 + [ -c /dev/pmu ] || grep -q mem /sys/power/state } do_suspend() |