summaryrefslogtreecommitdiff
path: root/sys/arch/loongson
diff options
context:
space:
mode:
authorPaul Irofti <pirofti@cvs.openbsd.org>2013-06-04 22:39:28 +0000
committerPaul Irofti <pirofti@cvs.openbsd.org>2013-06-04 22:39:28 +0000
commitdb93b1b0dcb71b1023d15d558349dcb68477a3b3 (patch)
tree643f125df1f8b38b3f15c9e536e482c62a27ff26 /sys/arch/loongson
parentd459286eee21b41c58ddedd65a170ca4a989083c (diff)
Make apm aware of the APM_IOC_HIBERNATE command.
While at it use STANDBY for RAM and SUSPEND for disk. Okay miod@
Diffstat (limited to 'sys/arch/loongson')
-rw-r--r--sys/arch/loongson/dev/apm.c5
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");