Page MenuHomeFreeBSD

geom: Allow BSD type '!0' partitions
ClosedPublic

Authored by jlduran on Mon, Nov 18, 12:29 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 10:31 AM
Unknown Object (File)
Mon, Nov 25, 2:36 AM
Unknown Object (File)
Sun, Nov 24, 5:07 PM
Unknown Object (File)
Thu, Nov 21, 9:31 AM
Unknown Object (File)
Wed, Nov 20, 10:34 PM
Unknown Object (File)
Tue, Nov 19, 8:45 PM
Unknown Object (File)
Tue, Nov 19, 1:07 PM
Unknown Object (File)
Tue, Nov 19, 2:06 AM

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 Skipped
Unit
Tests Skipped
Build Status
Buildable 60651
Build 57535: arc lint + arc unit

Event Timeline

jlduran created this revision.

I think this is reasonable -- 0 is unused/reserved, but no reason we shouldn't be able to specify it. It's not out of range etc.

This revision is now accepted and ready to land.Mon, Nov 18, 1:35 PM
This revision was automatically updated to reflect the committed changes.