summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2011-01-13 23:19:37 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2011-01-13 23:19:37 +0000
commitc1ade51e51663b237aab10a8a4ff832af760d9cd (patch)
treebc361ec9420de843d9fa002c862c381808b4fc7c /sys
parentb781e9eda35d7d33a4d8f5c8ec78b6e78b6a7af2 (diff)
if the BIOS tells us to suspend at the same time that we notice a lid
event, don't suspend twice. ok jsg
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/i386/apm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/apm.c b/sys/arch/i386/i386/apm.c
index fc6084fa87c..f390f472f0a 100644
--- a/sys/arch/i386/i386/apm.c
+++ b/sys/arch/i386/i386/apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apm.c,v 1.95 2011/01/04 23:08:56 deraadt Exp $ */
+/* $OpenBSD: apm.c,v 1.96 2011/01/13 23:19:36 deraadt Exp $ */
/*-
* Copyright (c) 1998-2001 Michael Shalayeff. All rights reserved.
@@ -525,6 +525,9 @@ apm_periodic_check(struct apm_softc *sc)
break;
}
+ /* If the APM BIOS tells us to suspend, don't do it twice */
+ if (regs.bx == APM_SUSPEND_REQ)
+ apm_lidclose = 0;
if (apm_handle_event(sc, &regs))
break;
}