diff options
author | 2013-06-04 22:39:27 +0000 | |
---|---|---|
committer | 2013-06-04 22:39:27 +0000 | |
commit | 524e4b656c092e15258893478bfb9e117a9b78b2 (patch) | |
tree | 14e6ed5f5ae1c1def0a8fccc3df44eeae2518671 | |
parent | do not go into upper to lower case translation mode when a all-caps (diff) | |
download | wireguard-openbsd-524e4b656c092e15258893478bfb9e117a9b78b2.tar.xz wireguard-openbsd-524e4b656c092e15258893478bfb9e117a9b78b2.zip |
Make apm aware of the APM_IOC_HIBERNATE command.
While at it use STANDBY for RAM and SUSPEND for disk.
Okay miod@
-rw-r--r-- | sys/arch/loongson/dev/apm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/loongson/dev/apm.c b/sys/arch/loongson/dev/apm.c index 564a9ea7b67..5ea0275d230 100644 --- a/sys/arch/loongson/dev/apm.c +++ b/sys/arch/loongson/dev/apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apm.c,v 1.14 2013/06/02 21:46:04 pirofti Exp $ */ +/* $OpenBSD: apm.c,v 1.15 2013/06/04 22:39:27 pirofti Exp $ */ /*- * Copyright (c) 2001 Alexander Guy. All rights reserved. @@ -224,6 +224,7 @@ apmioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) break; case APM_IOC_SUSPEND: case APM_IOC_SUSPEND_REQ: + case APM_IOC_HIBERNATE: if ((flag & FWRITE) == 0) error = EBADF; else if (sys_platform->suspend == NULL || @@ -376,7 +377,7 @@ apm_suspend(int state) rv = config_suspend(TAILQ_FIRST(&alldevs), DVACT_SUSPEND); #ifdef HIBERNATE - if (state == APM_STANDBY_REQ) { + if (state == APM_SUSPEND_REQ) { uvm_pmr_zero_everything(); if (hibernate_suspend()) { printf("apm: hibernate_suspend failed"); |