blob: c7f8e707feefd69361bad464414c96c110683772 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# disable processing of 99video
before_hooks()
{
disablehook 99video "disabled by uswsusp"
}
check_suspend()
{
grep -q mem /sys/power/state
}
do_suspend()
{
echo "mem" >/sys/power/state
}
check_hibernate()
{
[ -f /sys/power/disk ] && \
grep -q disk /sys/power/state && \
[ -c /dev/snapshot ] &&
command_exists s2disk
}
do_hibernate()
{
s2disk
}
check_suspend_hybrid()
{
grep -q mem /sys/power/state && \
command_exists s2both && \
check_hibernate
}
do_suspend_hybrid()
{
# a brief perusal of the source indicates that -f bypasses
# quirks application and the whitelist.
s2both -f
}
|