mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
It seems that libdisk(3) incorrectly sets d_secperunit value.
Automatically fix it like GEOM_PART_BSD does. MFC after: 1 week
This commit is contained in:
parent
7e0fa14052
commit
b9f41b60f4
1 changed files with 2 additions and 1 deletions
|
|
@ -1194,7 +1194,8 @@ checklabel(struct disklabel *lp)
|
|||
lp->d_interleave = vl->d_interleave;
|
||||
if (lp->d_secpercyl == 0)
|
||||
lp->d_secpercyl = vl->d_secpercyl;
|
||||
if (lp->d_secperunit == 0)
|
||||
if (lp->d_secperunit == 0 ||
|
||||
lp->d_secperunit > vl->d_secperunit)
|
||||
lp->d_secperunit = vl->d_secperunit;
|
||||
if (lp->d_bbsize == 0)
|
||||
lp->d_bbsize = vl->d_bbsize;
|
||||
|
|
|
|||
Loading…
Reference in a new issue