From 4d5e15665847ae6ead455ad5f86acefe8e7db96f Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Fri, 29 Feb 2008 19:02:35 +0000 Subject: Fix dksc() bootpath parsing. --- sys/arch/sgi/sgi/autoconf.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sys/arch') 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; } -- cgit v1.2.3