Page MenuHomeFreeBSD

geom: Allow BSD type '!0' partitions
ClosedPublic

Authored by jlduran on Nov 18 2024, 12:29 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Feb 8, 9:44 AM
Unknown Object (File)
Sat, Feb 7, 7:31 PM
Unknown Object (File)
Thu, Feb 5, 1:39 AM
Unknown Object (File)
Tue, Feb 3, 11:06 PM
Unknown Object (File)
Tue, Feb 3, 6:13 PM
Unknown Object (File)
Tue, Feb 3, 4:09 PM
Unknown Object (File)
Mon, Feb 2, 9:31 AM
Unknown Object (File)
Sat, Jan 31, 10:26 PM

Details

Summary

Allow the creation of partition type '!0', in order to replicate the
behavior of bsdlabel -w.

Fix it by not considering "0" an invalid partition type.

Test Plan
md0=$(mdconfig -s 100m)
md1=$(mdconfig -s 100m)

bsdlabel -w "$md0"

gpart create -s bsd "$md1"
gpart add -t '!0' -b 16 "$md1"

gpart show
=>     0  204800  md0  BSD  (100M)
       0      16       - free -  (8.0K)
      16  204784    1  !0  (100M)

=>     0  204800  md1  BSD  (100M)
       0      16       - free -  (8.0K)
      16  204784    1  !0  (100M)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable