summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-02-29 19:02:35 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-02-29 19:02:35 +0000
commit4d5e15665847ae6ead455ad5f86acefe8e7db96f (patch)
treeff77df705c96e25950231b4de5d47600bc575d02 /sys/arch
parentf09d729bc6c091d487e5c62e500533be509865c3 (diff)
Fix dksc() bootpath parsing.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sgi/sgi/autoconf.c9
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;
}