Allow sleep states to be specified as S1, S2, ...
This is used by zzz(8).
This commit is contained in:
parent
9bfbf98f8a
commit
1e480ac87f
@ -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