summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2013-09-28 12:40:28 +0000
committermiod <miod@openbsd.org>2013-09-28 12:40:28 +0000
commit7313f802ae50f774f030c4ef577969f14a8998be (patch)
treebe71ed189a43bd5b12ead69639c135bba8620fca
parentResolve the uncertainty in the REFID assignment. (diff)
downloadwireguard-openbsd-7313f802ae50f774f030c4ef577969f14a8998be.tar.xz
wireguard-openbsd-7313f802ae50f774f030c4ef577969f14a8998be.zip
In boot(), do not iterate over alldevs if it's empty (i.e. halting from ddb
with ddb entered early with boot -d or from UKC).
-rw-r--r--sys/arch/alpha/alpha/machdep.c5
-rw-r--r--sys/arch/amd64/amd64/machdep.c5
-rw-r--r--sys/arch/armv7/imx/imx_machdep.c5
-rw-r--r--sys/arch/aviion/aviion/machdep.c5
-rw-r--r--sys/arch/hp300/hp300/machdep.c5
-rw-r--r--sys/arch/hppa/hppa/machdep.c5
-rw-r--r--sys/arch/hppa64/hppa64/machdep.c5
-rw-r--r--sys/arch/i386/i386/machdep.c5
-rw-r--r--sys/arch/landisk/landisk/machdep.c5
-rw-r--r--sys/arch/loongson/loongson/machdep.c5
-rw-r--r--sys/arch/luna88k/luna88k/machdep.c5
-rw-r--r--sys/arch/macppc/macppc/machdep.c8
-rw-r--r--sys/arch/mvme68k/mvme68k/machdep.c5
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c5
-rw-r--r--sys/arch/octeon/octeon/machdep.c5
-rw-r--r--sys/arch/sgi/sgi/machdep.c5
-rw-r--r--sys/arch/socppc/socppc/machdep.c8
-rw-r--r--sys/arch/solbourne/solbourne/machdep.c5
-rw-r--r--sys/arch/sparc/sparc/machdep.c5
-rw-r--r--sys/arch/sparc64/sparc64/machdep.c5
-rw-r--r--sys/arch/vax/vax/machdep.c5
21 files changed, 67 insertions, 44 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c
index 58f27253ea7..964dd1fe2c2 100644
--- a/sys/arch/alpha/alpha/machdep.c
+++ b/sys/arch/alpha/alpha/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.141 2013/06/11 16:42:06 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.142 2013/09/28 12:40:28 miod Exp $ */
/* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */
/*-
@@ -1032,7 +1032,8 @@ boot(howto)
haltsys:
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
#ifdef BROKEN_PROM_CONSOLE
sio_intr_shutdown(NULL);
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c
index 308d6e4bfb3..b4fa7a5c529 100644
--- a/sys/arch/amd64/amd64/machdep.c
+++ b/sys/arch/amd64/amd64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.165 2013/06/29 21:06:15 brad Exp $ */
+/* $OpenBSD: machdep.c,v 1.166 2013/09/28 12:40:28 miod Exp $ */
/* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */
/*-
@@ -754,7 +754,8 @@ boot(int howto)
haltsys:
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
#ifdef MULTIPROCESSOR
x86_broadcast_ipi(X86_IPI_HALT);
diff --git a/sys/arch/armv7/imx/imx_machdep.c b/sys/arch/armv7/imx/imx_machdep.c
index a5a135253c1..537bb9930ab 100644
--- a/sys/arch/armv7/imx/imx_machdep.c
+++ b/sys/arch/armv7/imx/imx_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imx_machdep.c,v 1.1 2013/09/06 20:45:53 patrick Exp $ */
+/* $OpenBSD: imx_machdep.c,v 1.2 2013/09/28 12:40:28 miod Exp $ */
/* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */
/*
@@ -336,7 +336,8 @@ boot(int howto)
/* Run any shutdown hooks */
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
/* Make sure IRQ's are disabled */
IRQdisable;
diff --git a/sys/arch/aviion/aviion/machdep.c b/sys/arch/aviion/aviion/machdep.c
index 2e2a550b08f..88349d59f5c 100644
--- a/sys/arch/aviion/aviion/machdep.c
+++ b/sys/arch/aviion/aviion/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.51 2013/06/11 16:42:07 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.52 2013/09/28 12:40:29 miod Exp $ */
/*
* Copyright (c) 2007 Miodrag Vallat.
*
@@ -327,7 +327,8 @@ boot(howto)
haltsys:
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
if (howto & RB_HALT) {
printf("System halted.\n\n");
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c
index 50f7d974dd5..fb58d7a928f 100644
--- a/sys/arch/hp300/hp300/machdep.c
+++ b/sys/arch/hp300/hp300/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.138 2013/08/04 07:21:13 martin Exp $ */
+/* $OpenBSD: machdep.c,v 1.139 2013/09/28 12:40:29 miod Exp $ */
/* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */
/*
@@ -616,7 +616,8 @@ boot(howto)
haltsys:
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
/* Finally, halt/reboot the system. */
if (howto & RB_HALT) {
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index 731ba614f2b..ea45eed6328 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.211 2013/06/11 16:42:08 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.212 2013/09/28 12:40:29 miod Exp $ */
/*
* Copyright (c) 1999-2003 Michael Shalayeff
@@ -920,7 +920,8 @@ boot(int howto)
dumpsys();
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
#ifdef MULTIPROCESSOR
hppa_ipi_broadcast(HPPA_IPI_HALT);
diff --git a/sys/arch/hppa64/hppa64/machdep.c b/sys/arch/hppa64/hppa64/machdep.c
index 63162a464ff..24f3e9edf7e 100644
--- a/sys/arch/hppa64/hppa64/machdep.c
+++ b/sys/arch/hppa64/hppa64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.51 2013/06/11 16:42:08 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.52 2013/09/28 12:40:29 miod Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -570,7 +570,8 @@ boot(int howto)
dumpsys();
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
}
/* in case we came on powerfail interrupt */
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 79243860146..ce23c62287c 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.523 2013/06/11 16:42:08 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.524 2013/09/28 12:40:30 miod Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -2578,7 +2578,8 @@ boot(int howto)
haltsys:
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
#ifdef MULTIPROCESSOR
i386_broadcast_ipi(I386_IPI_HALT);
diff --git a/sys/arch/landisk/landisk/machdep.c b/sys/arch/landisk/landisk/machdep.c
index 6c9aa2fb9c5..ceddf4021fd 100644
--- a/sys/arch/landisk/landisk/machdep.c
+++ b/sys/arch/landisk/landisk/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.28 2013/06/11 16:42:09 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.29 2013/09/28 12:40:30 miod Exp $ */
/* $NetBSD: machdep.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */
/*-
@@ -222,7 +222,8 @@ boot(int howto)
haltsys:
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
_reg_write_1(LANDISK_PWRMNG, PWRMNG_POWEROFF);
diff --git a/sys/arch/loongson/loongson/machdep.c b/sys/arch/loongson/loongson/machdep.c
index bf53e35d593..bd328ef8bbc 100644
--- a/sys/arch/loongson/loongson/machdep.c
+++ b/sys/arch/loongson/loongson/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.42 2013/06/02 21:46:04 pirofti Exp $ */
+/* $OpenBSD: machdep.c,v 1.43 2013/09/28 12:40:30 miod Exp $ */
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
@@ -861,7 +861,8 @@ boot(int howto)
haltsys:
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
if (howto & RB_HALT) {
if (howto & RB_POWERDOWN) {
diff --git a/sys/arch/luna88k/luna88k/machdep.c b/sys/arch/luna88k/luna88k/machdep.c
index f8194562e91..973687e4cbd 100644
--- a/sys/arch/luna88k/luna88k/machdep.c
+++ b/sys/arch/luna88k/luna88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.89 2013/08/10 07:42:58 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.90 2013/09/28 12:40:30 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -502,7 +502,8 @@ boot(howto)
haltsys:
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
/* Luna88k supports automatic powerdown */
if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index 94c3fe299ba..79c2b846c50 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.140 2013/08/17 08:33:11 mpi Exp $ */
+/* $OpenBSD: machdep.c,v 1.141 2013/09/28 12:40:31 miod Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -826,7 +826,8 @@ boot(int howto)
splhigh();
if (howto & RB_HALT) {
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
#if NADB > 0
delay(1000000);
@@ -842,7 +843,8 @@ boot(int howto)
if (!cold && (howto & RB_DUMP))
dumpsys();
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
printf("rebooting\n\n");
#if NADB > 0
diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c
index 0bf5a890d85..4fc09ca1823 100644
--- a/sys/arch/mvme68k/mvme68k/machdep.c
+++ b/sys/arch/mvme68k/mvme68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.130 2013/06/11 16:42:09 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.131 2013/09/28 12:40:31 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -493,7 +493,8 @@ boot(howto)
haltsys:
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
if (howto & RB_HALT) {
printf("System halted. Press any key to reboot...\n\n");
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index 41f82291034..cbe4c162bf4 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.255 2013/06/11 16:42:10 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.256 2013/09/28 12:40:31 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -379,7 +379,8 @@ boot(howto)
haltsys:
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
if (howto & RB_HALT) {
printf("System halted. Press any key to reboot...\n\n");
diff --git a/sys/arch/octeon/octeon/machdep.c b/sys/arch/octeon/octeon/machdep.c
index e1d8f0c2ba8..8fa5be06e42 100644
--- a/sys/arch/octeon/octeon/machdep.c
+++ b/sys/arch/octeon/octeon/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.40 2013/08/23 08:18:25 pirofti Exp $ */
+/* $OpenBSD: machdep.c,v 1.41 2013/09/28 12:40:31 miod Exp $ */
/*
* Copyright (c) 2009, 2010 Miodrag Vallat.
@@ -693,7 +693,8 @@ boot(int howto)
haltsys:
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
if (howto & RB_HALT) {
if (howto & RB_POWERDOWN)
diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c
index fa106c14917..137e553e0b0 100644
--- a/sys/arch/sgi/sgi/machdep.c
+++ b/sys/arch/sgi/sgi/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.132 2012/10/08 21:47:50 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.133 2013/09/28 12:40:31 miod Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -867,7 +867,8 @@ boot(int howto)
haltsys:
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
if (howto & RB_HALT) {
if (howto & RB_POWERDOWN)
diff --git a/sys/arch/socppc/socppc/machdep.c b/sys/arch/socppc/socppc/machdep.c
index 292e1fb222d..e425f7ae0a7 100644
--- a/sys/arch/socppc/socppc/machdep.c
+++ b/sys/arch/socppc/socppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.36 2012/12/02 07:03:31 guenther Exp $ */
+/* $OpenBSD: machdep.c,v 1.37 2013/09/28 12:40:32 miod Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -1060,7 +1060,8 @@ boot(int howto)
splhigh();
if (howto & RB_HALT) {
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
;
}
@@ -1071,7 +1072,8 @@ boot(int howto)
if (!cold && (howto & RB_DUMP))
dumpsys();
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
printf("rebooting\n\n");
{
diff --git a/sys/arch/solbourne/solbourne/machdep.c b/sys/arch/solbourne/solbourne/machdep.c
index 6f96ce1a7e4..85b598631bf 100644
--- a/sys/arch/solbourne/solbourne/machdep.c
+++ b/sys/arch/solbourne/solbourne/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.25 2012/12/02 07:03:31 guenther Exp $ */
+/* $OpenBSD: machdep.c,v 1.26 2013/09/28 12:40:32 miod Exp $ */
/* OpenBSD: machdep.c,v 1.105 2005/04/11 15:13:01 deraadt Exp */
/*
@@ -560,7 +560,8 @@ boot(howto)
haltsys:
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
if ((howto & RB_HALT) || (howto & RB_POWERDOWN)) {
printf("halted\n\n");
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c
index 56c9ab5978d..70fd6f7230b 100644
--- a/sys/arch/sparc/sparc/machdep.c
+++ b/sys/arch/sparc/sparc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.146 2013/06/11 16:42:11 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.147 2013/09/28 12:40:32 miod Exp $ */
/* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */
/*
@@ -569,7 +569,8 @@ boot(howto)
haltsys:
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
if ((howto & RB_HALT) || (howto & RB_POWERDOWN)) {
#if defined(SUN4M)
diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c
index 93af369a8d7..e35b092009a 100644
--- a/sys/arch/sparc64/sparc64/machdep.c
+++ b/sys/arch/sparc64/sparc64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.147 2013/06/11 16:42:12 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.148 2013/09/28 12:40:32 miod Exp $ */
/* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */
/*-
@@ -655,7 +655,8 @@ boot(howto)
haltsys:
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
/* If powerdown was requested, do it. */
if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c
index 128697fa138..e5e31a206a6 100644
--- a/sys/arch/vax/vax/machdep.c
+++ b/sys/arch/vax/vax/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.126 2013/07/05 21:11:57 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.127 2013/09/28 12:40:32 miod Exp $ */
/* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */
/*
@@ -540,7 +540,8 @@ boot(howto)
haltsys:
doshutdownhooks();
- config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
+ if (!TAILQ_EMPTY(&alldevs))
+ config_suspend(TAILQ_FIRST(&alldevs), DVACT_POWERDOWN);
if (howto & RB_HALT) {
if (dep_call->cpu_halt)