diff options
author | 2008-02-29 19:02:34 +0000 | |
---|---|---|
committer | 2008-02-29 19:02:34 +0000 | |
commit | ca8a3895973275123e8a043c47e42785cee1b570 (patch) | |
tree | 83548b74d5dcb68bd325114d1e26d948214dd98c | |
parent | Fix db_read_bytes() for short reads. (diff) | |
download | wireguard-openbsd-ca8a3895973275123e8a043c47e42785cee1b570.tar.xz wireguard-openbsd-ca8a3895973275123e8a043c47e42785cee1b570.zip |
Fix dksc() bootpath parsing.
-rw-r--r-- | sys/arch/sgi/sgi/autoconf.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/arch/sgi/sgi/autoconf.c b/sys/arch/sgi/sgi/autoconf.c index fdf733ad4da..0932697a984 100644 --- a/sys/arch/sgi/sgi/autoconf.c +++ b/sys/arch/sgi/sgi/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.15 2007/06/01 19:25:10 deraadt Exp $ */ +/* $OpenBSD: autoconf.c,v 1.16 2008/02/29 19:02:34 miod Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom * Copyright (c) 1995 Theo de Raadt @@ -202,10 +202,10 @@ makebootdev(const char *bp, int offs) devname = "sd"; cp += 5; cp = boot_getnr(cp, &i); - if (*cp == ',') { + if (*cp++ == ',') { cp = boot_getnr(cp, &i); unit = i - 1; - if (*cp == ',') { + if (*cp++ == ',') { cp = boot_getnr(cp, &i); partition = i; } @@ -235,7 +235,8 @@ makebootdev(const char *bp, int offs) return -1; } - snprintf(bootdev, sizeof(bootdev), "%s%d%c", devname, unit, 'a'); + snprintf(bootdev, sizeof(bootdev), "%s%d%c", devname, unit, + 'a' + partition); return 0; } |