summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1997-01-02 12:24:36 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1997-01-02 12:24:36 +0000
commit5bf31bee3502ae6cd6f0b4ec5a0a118f51f34749 (patch)
treec97b534d8ee78b64ba040d493166bddf2428ea12 /sys/arch/i386
parent134b6f71c5753849936741021d4f62f7e3f4c93e (diff)
prevent system from suspend/standby twice.
(netbsd pr#3005, yasufu-i@is.aist-nara.ac.jp)
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/apm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/i386/i386/apm.c b/sys/arch/i386/i386/apm.c
index 95449489315..bbf0ee32bb8 100644
--- a/sys/arch/i386/i386/apm.c
+++ b/sys/arch/i386/i386/apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apm.c,v 1.3 1996/10/21 11:37:53 mickey Exp $ */
+/* $OpenBSD: apm.c,v 1.4 1997/01/02 12:24:35 mickey Exp $ */
/*-
* Copyright (c) 1995 John T. Kohl. All rights reserved.
@@ -311,8 +311,8 @@ struct apmregs *regs;
case APM_USER_STANDBY_REQ:
DPRINTF(("user wants STANDBY--fat chance\n"));
(void) apm_set_powstate(APM_DEV_ALLDEVS, APM_LASTREQ_REJECTED);
- (void) apm_record_event(sc, regs->bx);
- apm_userstandbys++;
+ if (apm_record_event(sc, regs->bx))
+ apm_userstandbys++;
break;
case APM_STANDBY_REQ:
DPRINTF(("standby requested\n"));
@@ -330,8 +330,8 @@ struct apmregs *regs;
DPRINTF(("user wants suspend--fat chance!\n"));
(void) apm_set_powstate(APM_DEV_ALLDEVS,
APM_LASTREQ_REJECTED);
- apm_suspends++;
- apm_record_event(sc, regs->bx);
+ if (apm_record_event(sc, regs->bx))
+ apm_suspends++;
break;
case APM_SUSPEND_REQ:
DPRINTF(("suspend requested\n"));