Allow sleep states to be specified as S1, S2, ...
This is used by zzz(8).
This commit is contained in:
parent
2e4a71cdb1
commit
d886fcc23e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118127
@ -63,6 +63,7 @@ Recognized types are
|
||||
and
|
||||
.Cm 5
|
||||
(soft off).
|
||||
Sleep states may also be given as S1, S2, etc.
|
||||
The supported states depend on BIOS implementation, including ACPI
|
||||
byte code (AML).
|
||||
.El
|
||||
|
@ -109,7 +109,10 @@ main(int argc, char *argv[])
|
||||
break;
|
||||
|
||||
case 's':
|
||||
sleep_type = optarg[0] - '0';
|
||||
if (optarg[0] == 'S')
|
||||
sleep_type = optarg[1] - '0';
|
||||
else
|
||||
sleep_type = optarg[0] - '0';
|
||||
if (sleep_type < 0 || sleep_type > 5)
|
||||
errx(EX_USAGE, "invalid sleep type (%d)",
|
||||
sleep_type);
|
||||
|
Loading…
Reference in New Issue
Block a user