diff options
| author | Joey Hess <joeyh@joeyh.name> | 2018-01-06 14:48:34 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2018-01-06 14:48:34 -0400 |
| commit | bc6045c8b5333ac5d407e8f4b96bb0d9f50dfa9a (patch) | |
| tree | 303bf5f1e584e58a31bfb45f6b8c714b2e3d622e /src/Propellor/Property/DiskImage | |
| parent | 48196467d11a856f411208ba5eadb20dd9455c10 (diff) | |
changes to allow GPT BIOS boot partitions
* Parted: Allow partitions to have no filesystem, for eg, GPT BIOS boot
partitions. (API change)
* Added rawPartition to PartSpec, for specifying partitions with no
filesystem.
* Added BiosGrubFlag to PartFlag.
Note that man parted does not list the "bios_boot" flag, but I found it in
its html documentation. Other flags may also be missing.
This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
Diffstat (limited to 'src/Propellor/Property/DiskImage')
| -rw-r--r-- | src/Propellor/Property/DiskImage/PartSpec.hs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Propellor/Property/DiskImage/PartSpec.hs b/src/Propellor/Property/DiskImage/PartSpec.hs index 942cfa3e..b78e4280 100644 --- a/src/Propellor/Property/DiskImage/PartSpec.hs +++ b/src/Propellor/Property/DiskImage/PartSpec.hs @@ -9,6 +9,7 @@ module Propellor.Property.DiskImage.PartSpec ( partition, -- * PartSpec combinators swapPartition, + rawPartition, mountedAt, addFreeSpace, setSize, @@ -48,11 +49,15 @@ import Data.Ord -- The partition is not mounted anywhere by default; use the combinators -- below to configure it. partition :: Monoid t => Fs -> PartSpec t -partition fs = (Nothing, mempty, mkPartition fs, mempty) +partition fs = (Nothing, mempty, mkPartition (Just fs), mempty) -- | Specifies a swap partition of a given size. swapPartition :: Monoid t => PartSize -> PartSpec t -swapPartition sz = (Nothing, mempty, const (mkPartition LinuxSwap sz), mempty) +swapPartition sz = (Nothing, mempty, const (mkPartition (Just LinuxSwap) sz), mempty) + +-- | Specifies a partition without any filesystem, of a given size. +rawPartition :: Monoid t => PartSize -> PartSpec t +rawPartition sz = (Nothing, mempty, const (mkPartition Nothing sz), mempty) -- | Specifies where to mount a partition. mountedAt :: PartSpec t -> MountPoint -> PartSpec t |
