summaryrefslogtreecommitdiff
path: root/sys/arch/i386/stand
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-04-14 10:48:05 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-04-14 10:48:05 +0000
commit3408f937ddc28986c25ff528b74bdef0ae19b863 (patch)
tree0363251344cbba34ce991ba2747b311fb660269c /sys/arch/i386/stand
parent242ab3cff4db861d0a03dc5e4757eac597dfd287 (diff)
kill extra linefeeding
Diffstat (limited to 'sys/arch/i386/stand')
-rw-r--r--sys/arch/i386/stand/boot/boot.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/sys/arch/i386/stand/boot/boot.c b/sys/arch/i386/stand/boot/boot.c
index 776d734cfc5..38293eb522c 100644
--- a/sys/arch/i386/stand/boot/boot.c
+++ b/sys/arch/i386/stand/boot/boot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: boot.c,v 1.5 1997/04/05 23:27:35 mickey Exp $ */
+/* $OpenBSD: boot.c,v 1.6 1997/04/14 10:48:04 deraadt Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -39,10 +39,11 @@
#include <debug.h>
#include "cmd.h"
-char *kernels[] = { "bsd", "bsd.gz",
- "obsd", "obsd.gz",
- "bsd.old", "bsd.old.gz",
- NULL };
+char *kernels[] = {
+ "bsd", "bsd.gz",
+ "obsd", "obsd.gz",
+ NULL
+};
extern const char version[];
int boothowto;
@@ -54,7 +55,7 @@ boot(bootdev)
{
register char *bootfile = kernels[0];
register struct cmd_state *cmd;
- register int i;
+ register int i = 0;
#ifdef DEBUG
*(u_int16_t*)0xb8148 = 0x4730;
@@ -69,7 +70,7 @@ boot(bootdev)
cons_probe();
debug_init();
- printf("\n>> OpenBSD BOOT: %u/%u k [%s]\n", cnvmem, extmem, version);
+ printf(">> OpenBSD BOOT: %u/%u k [%s]\n", cnvmem, extmem, version);
/* XXX init cmd here to cut on .data !!! */
cmd = (struct cmd_state *)alloc(sizeof(*cmd));
@@ -80,8 +81,7 @@ boot(bootdev)
cmd->addr = (void *)0x100000;
cmd->timeout = 50;
- for (i = 0;;) {
-
+ while (1) {
strncpy(cmd->image, bootfile, sizeof(cmd->image));
do {
@@ -91,17 +91,16 @@ boot(bootdev)
if (cmd->rc < 0)
break;
- printf("\nbooting %s: ", cmd->path);
- exec (cmd->path, cmd->addr, boothowto);
+ printf("booting %s: ", cmd->path);
+ exec(cmd->path, cmd->addr, boothowto);
- if(kernels[++i] == NULL)
+ if (kernels[++i] == NULL)
bootfile = kernels[i=0];
else
bootfile = kernels[i];
cmd->timeout += 20;
-
- printf(" failed(%d)\nwill try %s\n", errno, bootfile);
+ printf(" failed(%d). will try %s\n", errno, bootfile);
}
}