diff options
author | Dale S. Rahn <rahnds@cvs.openbsd.org> | 2000-01-22 03:27:53 +0000 |
---|---|---|
committer | Dale S. Rahn <rahnds@cvs.openbsd.org> | 2000-01-22 03:27:53 +0000 |
commit | 8914feb9090d8c25fd3dc7656731c22d456ced27 (patch) | |
tree | 046e64374b4162b00a855a2aa7b1a07cf77b67fb /sys/arch/powerpc | |
parent | 91efa97bb5bf068fd03b740f683ff78c306048f0 (diff) |
do not interpret a '-' character in a file or bootpath as the beginning of
options, the dash character is only special if a space preceeds it.
fixes booting from "/pci/mac-io/ide/disk/bsd".
Diffstat (limited to 'sys/arch/powerpc')
-rw-r--r-- | sys/arch/powerpc/stand/boot.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/arch/powerpc/stand/boot.c b/sys/arch/powerpc/stand/boot.c index 4f00ff872a4..85f4ceed6b2 100644 --- a/sys/arch/powerpc/stand/boot.c +++ b/sys/arch/powerpc/stand/boot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: boot.c,v 1.10 2000/01/14 05:44:18 rahnds Exp $ */ +/* $OpenBSD: boot.c,v 1.11 2000/01/22 03:27:52 rahnds Exp $ */ /* $NetBSD: boot.c,v 1.1 1997/04/16 20:29:17 thorpej Exp $ */ /* @@ -80,8 +80,6 @@ prom2boot(dev) char *dev; { char *cp, *lp = 0; - int handle; - char devtype[16]; for (cp = dev; *cp; cp++) if (*cp == ':') @@ -103,9 +101,14 @@ parseargs(str, howtop) _rtt(); *howtop = 0; - for (cp = str; *cp; cp++) - if (*cp == ' ' || *cp == '-') + if (str[0] == '\0') { + return; + } + for (cp = &str[1]; *cp; cp++) { + if (cp[-1] == ' ' && *cp == '-') { break; + } + } if (!*cp) return; |