diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2013-09-28 12:40:33 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2013-09-28 12:40:33 +0000 |
commit | 8817d0b5c1445f970be2840d71c641f02e753bf2 (patch) | |
tree | 0e9ce38c4c0f38d80fa435d921564b33988528c3 /sys/arch/sparc64 | |
parent | 0669b04e6ab16a18f825d426832518ec008bc297 (diff) |
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).
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/sparc64/machdep.c | 5 |
1 files changed, 3 insertions, 2 deletions
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) { |