diff options
author | 2011-01-13 23:19:36 +0000 | |
---|---|---|
committer | 2011-01-13 23:19:36 +0000 | |
commit | 0b347165c73daa8112d0685c90b4eff970f65516 (patch) | |
tree | 30acf941cde8d96898d5149b2efbdd9fec4a8f34 | |
parent | move to 4.9-current (diff) | |
download | wireguard-openbsd-0b347165c73daa8112d0685c90b4eff970f65516.tar.xz wireguard-openbsd-0b347165c73daa8112d0685c90b4eff970f65516.zip |
if the BIOS tells us to suspend at the same time that we notice a lid
event, don't suspend twice.
ok jsg
-rw-r--r-- | sys/arch/i386/i386/apm.c | 5 |
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, ®s)) break; } |