HomeFreeBSD

loader: disk_open() should honor D_PARTNONE

Description

loader: disk_open() should honor D_PARTNONE

The D_PARTNONE is documented to make it possible to open raw MBR
partition, but the current disk_open() does not really implement this
statement.

The current code is checking partition against -1 (D_PARTNONE) but does
attempt to open partition table in case we do have FreeBSD MBR partition type.
Instead, we should check -2 (D_PARTWILD).

In case we do have MBR + BSD label, this code is only working because
by default, the first BSD partiton is created starting with relative sector
0, and we can still access the BSD table from that MBR slice.

Reviewed by: imp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20501

Details

Committed
tsoomeJun 6 2019, 4:27 PM
Reviewer
imp
Differential Revision
D20501: loader: disk_open() should honor D_PARTNONE
Parents
rS348747: Add sysctls for uma_kmem_{limit,total}.
Branches
Unknown
Tags
Unknown