summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Parted.hs
diff options
context:
space:
mode:
authorJoey Hess2015-09-02 15:09:47 -0700
committerJoey Hess2015-09-02 15:09:47 -0700
commit418e6a5b4ee36360911cdff14f70357c5c2bfc80 (patch)
tree23eb35df201ba768246c5de5e6ea9b5f8ddcc605 /src/Propellor/Property/Parted.hs
parentf49dd3692708ea8e0adbaa701f562de264f40153 (diff)
propellor spin
Diffstat (limited to 'src/Propellor/Property/Parted.hs')
-rw-r--r--src/Propellor/Property/Parted.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Propellor/Property/Parted.hs b/src/Propellor/Property/Parted.hs
index fcff089a..1ff8677a 100644
--- a/src/Propellor/Property/Parted.hs
+++ b/src/Propellor/Property/Parted.hs
@@ -11,6 +11,7 @@ module Propellor.Property.Parted (
ByteSize,
toPartSize,
fromPartSize,
+ reducePartSize,
Partition.MkfsOpts,
PartType(..),
PartFlag(..),
@@ -104,6 +105,9 @@ instance Monoid PartSize where
mempty = MegaBytes 0
mappend (MegaBytes a) (MegaBytes b) = MegaBytes (a + b)
+reducePartSize :: PartSize -> PartSize -> PartSize
+reducePartSize (MegaBytes a) (MegaBytes b) = MegaBytes (a - b)
+
-- | Flags that can be set on a partition.
data PartFlag = BootFlag | RootFlag | SwapFlag | HiddenFlag | RaidFlag | LvmFlag | LbaFlag | LegacyBootFlag | IrstFlag | EspFlag | PaloFlag
deriving (Show)