MFC: 196326

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)
This commit is contained in:
John Hay 2009-08-17 15:39:47 +00:00
parent 08c347079c
commit c49b5baa65

View file

@ -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++;