.TP
\fB-m\fP \fImode\fP | \fB--mode\fP \fImode\fP
Use standby state \fImode\fP. Valid values are \fIstandby\fP,
-\fImem\fP, \fIdisk\fP and \fIon\fP (no suspend). The default is
-\fIstandby\fP.
+\fImem\fP, \fIdisk\fP, \fIno\fP (no suspend) and \fIon\fP (for debugging).
+The default is \fIstandby\fP.
.SH NOTES
Some PC systems can't currently exit sleep states such as \fImem\fP
using only the kernel code accessed by this driver.
|| strcmp(optarg, "mem") == 0
|| strcmp(optarg, "disk") == 0
|| strcmp(optarg, "on") == 0
+ || strcmp(optarg, "no") == 0
) {
suspend = strdup(optarg);
break;
devname = new_devname;
}
- if (strcmp(suspend, "on") != 0 && !is_wakeup_enabled(devname)) {
+ if (strcmp(suspend, "on") != 0 && strcmp(suspend, "no") != 0
+ && !is_wakeup_enabled(devname)) {
fprintf(stderr, _("%s: %s not enabled for wakeup events\n"),
progname, devname);
exit(EXIT_FAILURE);
if (setup_alarm(fd, &alarm) < 0)
exit(EXIT_FAILURE);
- sync();
printf(_("%s: wakeup from \"%s\" using %s at %s\n"),
progname, suspend, devname,
ctime(&alarm));
fflush(stdout);
usleep(10 * 1000);
- if (strcmp(suspend, "on") != 0)
+ if (strcmp(suspend, "no") == 0)
+ exit(EXIT_SUCCESS);
+ else if (strcmp(suspend, "on") != 0) {
+ sync();
suspend_system(suspend);
- else {
+ } else {
unsigned long data;
do {