mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
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:
parent
08c347079c
commit
c49b5baa65
1 changed files with 5 additions and 8 deletions
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue