From: uebayasi Date: Sun, 13 Jul 2014 22:53:38 +0000 (+0000) Subject: boot(9): Cosmetic changes to improve diff'ability. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b19c85f4aac4b4d9960b404bc0a8bab037087864;p=openbsd boot(9): Cosmetic changes to improve diff'ability. --- diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c index 5b1141242ff..3ec94701f00 100644 --- a/sys/arch/alpha/alpha/machdep.c +++ b/sys/arch/alpha/alpha/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.161 2014/07/13 22:13:06 uebayasi Exp $ */ +/* $OpenBSD: machdep.c,v 1.162 2014/07/13 22:53:38 uebayasi Exp $ */ /* $NetBSD: machdep.c,v 1.210 2000/06/01 17:12:38 thorpej Exp $ */ /*- @@ -1031,7 +1031,7 @@ boot(int howto) cpus_running); #endif - if (howto & RB_DUMP) + if ((howto & RB_DUMP) != 0) dumpsys(); haltsys: @@ -1056,7 +1056,8 @@ haltsys: } printf("%s\n\n", howto & RB_HALT ? "halted." : "rebooting..."); prom_halt(howto & RB_HALT); - /*NOTREACHED*/ + for (;;) ; + /* NOTREACHED */ } /* diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index 0c767c7061f..c275f588b15 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.187 2014/07/13 22:13:06 uebayasi Exp $ */ +/* $OpenBSD: machdep.c,v 1.188 2014/07/13 22:53:38 uebayasi Exp $ */ /* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */ /*- @@ -812,7 +812,7 @@ haltsys: delay(cpureset_delay * 1000); cpu_reset(); for(;;) ; - /*NOTREACHED*/ + /* NOTREACHED */ } /* diff --git a/sys/arch/armish/armish/armish_machdep.c b/sys/arch/armish/armish/armish_machdep.c index 339d071ad0e..0c7dc79c1bc 100644 --- a/sys/arch/armish/armish/armish_machdep.c +++ b/sys/arch/armish/armish/armish_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: armish_machdep.c,v 1.29 2014/07/13 22:13:06 uebayasi Exp $ */ +/* $OpenBSD: armish_machdep.c,v 1.30 2014/07/13 22:53:38 uebayasi Exp $ */ /* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */ /* @@ -303,8 +303,8 @@ haltsys: board_reset(); cpu_reset(); printf("reboot failed; spinning\n"); - while(1); - /*NOTREACHED*/ + for (;;) ; + /* NOTREACHED */ } /* diff --git a/sys/arch/armv7/armv7/armv7_machdep.c b/sys/arch/armv7/armv7/armv7_machdep.c index 1cd368bcacf..f1fc83a64f1 100644 --- a/sys/arch/armv7/armv7/armv7_machdep.c +++ b/sys/arch/armv7/armv7/armv7_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: armv7_machdep.c,v 1.12 2014/07/13 22:13:06 uebayasi Exp $ */ +/* $OpenBSD: armv7_machdep.c,v 1.13 2014/07/13 22:53:38 uebayasi Exp $ */ /* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */ /* @@ -316,8 +316,8 @@ boot(int howto) delay(500000); platform_watchdog_reset(); printf("reboot failed; spinning\n"); - while(1); - /*NOTREACHED*/ + for (;;) ; + /* NOTREACHED */ } static __inline diff --git a/sys/arch/aviion/aviion/machdep.c b/sys/arch/aviion/aviion/machdep.c index e8e36830452..0e5bb03e0f9 100644 --- a/sys/arch/aviion/aviion/machdep.c +++ b/sys/arch/aviion/aviion/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.69 2014/07/13 22:13:06 uebayasi Exp $ */ +/* $OpenBSD: machdep.c,v 1.70 2014/07/13 22:53:38 uebayasi Exp $ */ /* * Copyright (c) 2007 Miodrag Vallat. * @@ -339,8 +339,8 @@ haltsys: doboot(); - for (;;); - /*NOTREACHED*/ + for (;;) ; + /* NOTREACHED */ } unsigned dumpmag = 0x8fca0101; /* magic number for savecore */ diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c index 4db910ea75d..0a149c0283b 100644 --- a/sys/arch/hppa/hppa/machdep.c +++ b/sys/arch/hppa/hppa/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.230 2014/07/13 22:13:06 uebayasi Exp $ */ +/* $OpenBSD: machdep.c,v 1.231 2014/07/13 22:53:38 uebayasi Exp $ */ /* * Copyright (c) 1999-2003 Michael Shalayeff @@ -967,7 +967,7 @@ haltsys: :: "r" (CMD_RESET), "r" (HPPA_LBCAST + iomod_command)); } - for (;;) ; /* loop while bus reset is coming up */ + for (;;) ; /* NOTREACHED */ } diff --git a/sys/arch/hppa64/hppa64/machdep.c b/sys/arch/hppa64/hppa64/machdep.c index adec950bfe2..88a80d651fa 100644 --- a/sys/arch/hppa64/hppa64/machdep.c +++ b/sys/arch/hppa64/hppa64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.68 2014/07/13 22:13:06 uebayasi Exp $ */ +/* $OpenBSD: machdep.c,v 1.69 2014/07/13 22:53:39 uebayasi Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -600,7 +600,7 @@ haltsys: :: "r" (CMD_RESET), "r" (HPPA_LBCAST + iomod_command)); } - for (;;) ; /* loop while bus reset is coming up */ + for (;;) ; /* NOTREACHED */ } diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 685e65b91f4..09eecc98d81 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.547 2014/07/13 22:13:06 uebayasi Exp $ */ +/* $OpenBSD: machdep.c,v 1.548 2014/07/13 22:53:39 uebayasi Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -2658,7 +2658,7 @@ haltsys: printf("rebooting...\n"); cpu_reset(); for(;;) ; - /*NOTREACHED*/ + /* NOTREACHED */ } /* diff --git a/sys/arch/landisk/landisk/machdep.c b/sys/arch/landisk/landisk/machdep.c index 5d800bc7949..42337243323 100644 --- a/sys/arch/landisk/landisk/machdep.c +++ b/sys/arch/landisk/landisk/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.37 2014/07/13 22:13:06 uebayasi Exp $ */ +/* $OpenBSD: machdep.c,v 1.38 2014/07/13 22:53:39 uebayasi Exp $ */ /* $NetBSD: machdep.c,v 1.1 2006/09/01 21:26:18 uwe Exp $ */ /*- @@ -246,7 +246,7 @@ haltsys: printf("rebooting...\n"); machine_reset(); - /*NOTREACHED*/ + /* NOTREACHED */ for (;;) { continue; } diff --git a/sys/arch/loongson/loongson/machdep.c b/sys/arch/loongson/loongson/machdep.c index 3513bc71708..29c41a1b40d 100644 --- a/sys/arch/loongson/loongson/machdep.c +++ b/sys/arch/loongson/loongson/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.55 2014/07/13 22:13:06 uebayasi Exp $ */ +/* $OpenBSD: machdep.c,v 1.56 2014/07/13 22:53:39 uebayasi Exp $ */ /* * Copyright (c) 2009, 2010, 2014 Miodrag Vallat. @@ -962,7 +962,7 @@ haltsys: } for (;;) ; - /*NOTREACHED*/ + /* NOTREACHED */ } u_long dumpmag = 0x8fca0101; /* Magic number for savecore. */ diff --git a/sys/arch/luna88k/luna88k/machdep.c b/sys/arch/luna88k/luna88k/machdep.c index 67058a0ec7c..514aad9d4be 100644 --- a/sys/arch/luna88k/luna88k/machdep.c +++ b/sys/arch/luna88k/luna88k/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.106 2014/07/13 22:13:07 uebayasi Exp $ */ +/* $OpenBSD: machdep.c,v 1.107 2014/07/13 22:53:39 uebayasi Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -518,8 +518,8 @@ haltsys: *((volatile unsigned *)0x6d000010) = 0; } - for (;;); /* to keep compiler happy, and me from going crazy */ - /*NOTREACHED*/ + for (;;) ; + /* NOTREACHED */ } u_long dumpmag = 0x8fca0101; /* magic number for savecore */ diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c index 0a83f03124e..9a6fcee994e 100644 --- a/sys/arch/macppc/macppc/machdep.c +++ b/sys/arch/macppc/macppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.158 2014/07/13 22:13:07 uebayasi Exp $ */ +/* $OpenBSD: machdep.c,v 1.159 2014/07/13 22:53:39 uebayasi Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -813,7 +813,7 @@ boot(int howto) } boothowto = howto; - if (!(howto & RB_NOSYNC) && !syncing) { + if ((howto & RB_NOSYNC) == 0 && !syncing) { syncing = 1; vfs_shutdown(); @@ -860,7 +860,8 @@ haltsys: OF_interpret("reset-all", 0); OF_exit(); printf("boot failed, spinning\n"); - while(1) /* forever */; + for (;;) ; + /* NOTREACHED */ } typedef void (void_f) (void); diff --git a/sys/arch/octeon/octeon/machdep.c b/sys/arch/octeon/octeon/machdep.c index fb6c6abae06..eda7c3ee7f0 100644 --- a/sys/arch/octeon/octeon/machdep.c +++ b/sys/arch/octeon/octeon/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.58 2014/07/13 22:13:07 uebayasi Exp $ */ +/* $OpenBSD: machdep.c,v 1.59 2014/07/13 22:53:39 uebayasi Exp $ */ /* * Copyright (c) 2009, 2010 Miodrag Vallat. @@ -718,7 +718,7 @@ haltsys: } for (;;) ; - /*NOTREACHED*/ + /* NOTREACHED */ } u_long dumpmag = 0x8fca0101; /* Magic number for savecore. */ diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c index f6f6851d822..02cdb50b676 100644 --- a/sys/arch/sgi/sgi/machdep.c +++ b/sys/arch/sgi/sgi/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.146 2014/07/13 22:13:07 uebayasi Exp $ */ +/* $OpenBSD: machdep.c,v 1.147 2014/07/13 22:53:39 uebayasi Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -879,7 +879,7 @@ haltsys: printf("Failed!!! Please reset manually.\n"); for (;;) ; - /*NOTREACHED*/ + /* NOTREACHED */ } void diff --git a/sys/arch/socppc/socppc/machdep.c b/sys/arch/socppc/socppc/machdep.c index c5e8339310f..d3ef1e90087 100644 --- a/sys/arch/socppc/socppc/machdep.c +++ b/sys/arch/socppc/socppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.53 2014/07/13 22:13:07 uebayasi Exp $ */ +/* $OpenBSD: machdep.c,v 1.54 2014/07/13 22:53:39 uebayasi Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -1041,7 +1041,7 @@ boot(int howto) } boothowto = howto; - if (!(howto & RB_NOSYNC) && !syncing) { + if ((howto & RB_NOSYNC) == 0 && !syncing) { syncing = 1; vfs_shutdown(); @@ -1057,7 +1057,7 @@ boot(int howto) splhigh(); cold = 1; - if ((howto & RB_DUMP)) + if ((howto & RB_DUMP) != 0) dumpsys(); haltsys: @@ -1087,7 +1087,8 @@ haltsys: } printf("boot failed, spinning\n"); - while(1) /* forever */; + for (;;) ; + /* NOTREACHED */ } void diff --git a/sys/arch/solbourne/solbourne/machdep.c b/sys/arch/solbourne/solbourne/machdep.c index a8c5aab668e..fd0008a6071 100644 --- a/sys/arch/solbourne/solbourne/machdep.c +++ b/sys/arch/solbourne/solbourne/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.40 2014/07/13 22:13:07 uebayasi Exp $ */ +/* $OpenBSD: machdep.c,v 1.41 2014/07/13 22:53:39 uebayasi Exp $ */ /* OpenBSD: machdep.c,v 1.105 2005/04/11 15:13:01 deraadt Exp */ /* @@ -570,7 +570,8 @@ haltsys: } else str[0] = 0; romboot(str); - /*NOTREACHED*/ + for (;;) ; + /* NOTREACHED */ } /* XXX - needs to be written */ diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c index ef44477b089..ccc910cdc9c 100644 --- a/sys/arch/sparc/sparc/machdep.c +++ b/sys/arch/sparc/sparc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.162 2014/07/13 22:13:07 uebayasi Exp $ */ +/* $OpenBSD: machdep.c,v 1.163 2014/07/13 22:53:39 uebayasi Exp $ */ /* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */ /* @@ -592,7 +592,8 @@ haltsys: } else str[0] = 0; romboot(str); - /*NOTREACHED*/ + for (;;) ; + /* NOTREACHED */ } /* XXX - dumpmag not eplicitly used, savecore may search for it to get here */ diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c index 4d28099a0d9..35c6b864aa9 100644 --- a/sys/arch/sparc64/sparc64/machdep.c +++ b/sys/arch/sparc64/sparc64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.165 2014/07/13 22:13:07 uebayasi Exp $ */ +/* $OpenBSD: machdep.c,v 1.166 2014/07/13 22:53:39 uebayasi Exp $ */ /* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */ /*- @@ -694,7 +694,8 @@ haltsys: str[0] = 0; OF_boot(str); panic("cpu_reboot -- failed"); - /*NOTREACHED*/ + for (;;) ; + /* NOTREACHED */ } u_long dumpmag = 0x8fca0101; /* magic number for savecore */ diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c index 73805424b3d..fbe919ee027 100644 --- a/sys/arch/vax/vax/machdep.c +++ b/sys/arch/vax/vax/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.141 2014/07/13 22:13:07 uebayasi Exp $ */ +/* $OpenBSD: machdep.c,v 1.142 2014/07/13 22:53:39 uebayasi Exp $ */ /* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */ /* @@ -538,7 +538,6 @@ boot(int howto) if (howto & RB_DUMP) dumpsys(); - haltsys: doshutdownhooks(); mainbus = device_mainbus(); diff --git a/sys/arch/zaurus/zaurus/zaurus_machdep.c b/sys/arch/zaurus/zaurus/zaurus_machdep.c index e163328ccdd..bae292985bd 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.49 2014/07/13 22:13:07 uebayasi Exp $ */ +/* $OpenBSD: zaurus_machdep.c,v 1.50 2014/07/13 22:53:39 uebayasi Exp $ */ /* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */ /* @@ -355,8 +355,8 @@ haltsys: zapm_restart(); #endif printf("reboot failed; spinning\n"); - while(1); - /*NOTREACHED*/ + for (;;) ; + /* NOTREACHED */ } static __inline