diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-05-29 00:03:14 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-05-29 00:03:14 +0000 |
commit | c1f29978c6a9c09ae0accd6243fba6843793fc19 (patch) | |
tree | bdd786a8f16ee123595bd836f30f9011faab2caf /sys/stand/boot/boot.c | |
parent | 346f6a0569d7724812f218fac3414d8df48cc87e (diff) |
remove support for many alternative kernel choices -- only try /bsd and
not the other stupid names. that feature was retarded. tested on a few
architectures by a few people
Diffstat (limited to 'sys/stand/boot/boot.c')
-rw-r--r-- | sys/stand/boot/boot.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/sys/stand/boot/boot.c b/sys/stand/boot/boot.c index cd1930afae3..402537771de 100644 --- a/sys/stand/boot/boot.c +++ b/sys/stand/boot/boot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: boot.c,v 1.32 2004/06/24 22:32:26 tom Exp $ */ +/* $OpenBSD: boot.c,v 1.33 2007/05/29 00:03:13 deraadt Exp $ */ /* * Copyright (c) 2003 Dale Rahn @@ -37,12 +37,9 @@ #include "cmd.h" -static const char *const kernels[] = { - "/bsd", - "/obsd", - "/bsd.old", - NULL -}; +#ifndef KERNEL +#define KERNEL "/bsd" +#endif char prog_ident[40]; char *progname = "BOOT"; @@ -56,8 +53,8 @@ int bootprompt = 1; void boot(dev_t bootdev) { - const char *bootfile = kernels[0]; - int i = 0, try = 0, st; + const char *bootfile = KERNEL; + int try = 0, st; u_long marks[MARK_MAX]; machdep(); @@ -92,11 +89,8 @@ boot(dev_t bootdev) if (loadfile(cmd.path, marks, LOAD_ALL) >= 0) break; - if (kernels[++i] == NULL) { - try += 1; - bootfile = kernels[i=0]; - } else - bootfile = kernels[i]; + bootfile = KERNEL; + try++; strlcpy(cmd.image, bootfile, sizeof(cmd.image)); printf(" failed(%d). will try %s\n", errno, bootfile); |