summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386/gptboot
diff options
context:
space:
mode:
authorjhay <jhay@FreeBSD.org>2009-08-17 15:19:03 +0000
committerjhay <jhay@FreeBSD.org>2009-08-17 15:19:03 +0000
commit1f292692a8c42cf236bc25b557bd55a23213474c (patch)
treea6f5e78b18e08f54ed7192587c42e33395509a2a /sys/boot/i386/gptboot
parent7c9f41ca66facdb5209f1e3560290ed65e647bde (diff)
downloadFreeBSD-src-1f292692a8c42cf236bc25b557bd55a23213474c.zip
FreeBSD-src-1f292692a8c42cf236bc25b557bd55a23213474c.tar.gz
Fix parse() so that the partition to boot (load /boot/loader) from can
be set. The syntax as printed in main() is used: 0:ad(0p3)/boot/loader Reviewed by: jhb Approved by: re (kib)
Diffstat (limited to 'sys/boot/i386/gptboot')
-rw-r--r--sys/boot/i386/gptboot/gptboot.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c
index 405b92e..89df2ec 100644
--- a/sys/boot/i386/gptboot/gptboot.c
+++ b/sys/boot/i386/gptboot/gptboot.c
@@ -466,16 +466,13 @@ parse(void)
dsk.type = i;
arg += 3;
dsk.unit = *arg - '0';
- if (arg[1] != ',' || dsk.unit > 9)
+ if (arg[1] != 'p' || dsk.unit > 9)
return -1;
arg += 2;
- dsk.part = -1;
- if (arg[1] == ',') {
- dsk.part = *arg - '0';
- if (dsk.part < 1 || dsk.part > 9)
- return -1;
- arg += 2;
- }
+ dsk.part = *arg - '0';
+ if (dsk.part < 1 || dsk.part > 9)
+ return -1;
+ arg++;
if (arg[0] != ')')
return -1;
arg++;
OpenPOWER on IntegriCloud