diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-10-02 23:31:35 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-10-02 23:31:35 +0000 |
commit | 4c1e959777802a68194431ffe5cdc15f539de132 (patch) | |
tree | 269033fd7807f11a69c69c31e9b98b1c33ad1e34 | |
parent | 5f350d1fcac52f90c3748e7e05cf6ec11f50bc74 (diff) |
turn off lid suspend if we doing halt -p
ok kettenis marco miod
-rw-r--r-- | sys/arch/amd64/amd64/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 5 | ||||
-rw-r--r-- | sys/arch/zaurus/zaurus/zaurus_machdep.c | 7 |
3 files changed, 13 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index 0b7d99e162b..46d8724262b 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.123 2010/10/02 23:30:39 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.124 2010/10/02 23:31:33 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */ /*- @@ -717,6 +717,8 @@ struct pcb dumppcb; void boot(int howto) { + if (howto & RB_POWERDOWN) + lid_suspend = 0; if (cold) { /* diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index d2da0fd83a7..fd7453aa2ae 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.484 2010/10/02 23:30:39 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.485 2010/10/02 23:31:34 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -2403,6 +2403,9 @@ struct pcb dumppcb; void boot(int howto) { + if (howto & RB_POWERDOWN) + lid_suspend = 0; + if (cold) { /* * If the system is cold, just halt, unless the user diff --git a/sys/arch/zaurus/zaurus/zaurus_machdep.c b/sys/arch/zaurus/zaurus/zaurus_machdep.c index 4bc2e34d9c3..3c4109e1612 100644 --- a/sys/arch/zaurus/zaurus/zaurus_machdep.c +++ b/sys/arch/zaurus/zaurus/zaurus_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zaurus_machdep.c,v 1.35 2010/06/27 06:21:44 beck Exp $ */ +/* $OpenBSD: zaurus_machdep.c,v 1.36 2010/10/02 23:31:34 deraadt Exp $ */ /* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */ /* @@ -289,6 +289,11 @@ int comcnmode = CONMODE; void boot(int howto) { + extern int lid_suspend; + + if (howto & RB_POWERDOWN) + lid_suspend = 0; + if (cold) { /* * If the system is cold, just halt, unless the user |