summaryrefslogtreecommitdiff
path: root/sys/arch/hppa
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-08-03 18:57:05 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-08-03 18:57:05 +0000
commit44673075be5c3859ad63aa4577ef7071e1e2a6ed (patch)
tree72c790c11e853099b3fa92db0d2af34c7d105594 /sys/arch/hppa
parent61470a1930fbed3a457fb79972e6c531a0bc57dc (diff)
rework boot() w/o a goto
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r--sys/arch/hppa/hppa/machdep.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index c7b74feab3b..dc0e12b2556 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.75 2002/07/25 22:32:33 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.76 2002/08/03 18:57:04 mickey Exp $ */
/*
* Copyright (c) 1999-2002 Michael Shalayeff
@@ -899,36 +899,36 @@ boot(howto)
int howto;
{
/* If system is cold, just halt. */
- if (cold) {
+ if (cold)
howto |= RB_HALT;
- goto haltsys;
- }
+ else {
- boothowto = howto | (boothowto & RB_HALT);
+ boothowto = howto | (boothowto & RB_HALT);
- if (!(howto & RB_NOSYNC)) {
- waittime = 0;
- vfs_shutdown();
- /*
- * If we've been adjusting the clock, the todr
- * will be out of synch; adjust it now unless
- * the system was sitting in ddb.
- */
- if ((howto & RB_TIMEBAD) == 0)
- resettodr();
- else
- printf("WARNING: not updating battery clock\n");
- }
+ if (!(howto & RB_NOSYNC)) {
+ waittime = 0;
+ vfs_shutdown();
+ /*
+ * If we've been adjusting the clock, the todr
+ * will be out of synch; adjust it now unless
+ * the system was sitting in ddb.
+ */
+ if ((howto & RB_TIMEBAD) == 0)
+ resettodr();
+ else
+ printf("WARNING: not updating battery clock\n");
+ }
+
+ /* XXX probably save howto into stable storage */
- /* XXX probably save howto into stable storage */
+ splhigh();
- splhigh();
+ if (howto & RB_DUMP)
+ dumpsys();
- if (howto & RB_DUMP)
- dumpsys();
+ doshutdownhooks();
+ }
- doshutdownhooks();
-haltsys:
/* in case we came on powerfail interrupt */
if (cold_hook)
(*cold_hook)(HPPA_COLD_COLD);