diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-09-05 16:30:58 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-09-05 16:30:58 -0400 |
| commit | d9866a1ba5d0a4adca8bd026c652b762302bba45 (patch) | |
| tree | 3142654661458b11993863a91852c7e8803c040c /src/Propellor/Property/Partition.hs | |
| parent | 196a112539407c55c73628c0c29f7ff54c709275 (diff) | |
move parseFs to Property.Partition
Diffstat (limited to 'src/Propellor/Property/Partition.hs')
| -rw-r--r-- | src/Propellor/Property/Partition.hs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Propellor/Property/Partition.hs b/src/Propellor/Property/Partition.hs index 679675b7..27ae89ff 100644 --- a/src/Propellor/Property/Partition.hs +++ b/src/Propellor/Property/Partition.hs @@ -15,6 +15,20 @@ import Data.Char data Fs = EXT2 | EXT3 | EXT4 | BTRFS | REISERFS | XFS | FAT | VFAT | NTFS | LinuxSwap deriving (Show, Eq) +-- | Parse commonly used names of filesystems. +parseFs :: String -> Maybe Fs +parseFs "ext2" = Just EXT2 +parseFs "ext3" = Just EXT3 +parseFs "ext4" = Just EXT4 +parseFs "btrfs" = Just BTRFS +parseFs "reiserfs" = Just REISERFS +parseFs "xfs" = Just XFS +parseFs "fat" = Just FAT +parseFs "vfat" = Just VFAT +parseFs "ntfs" = Just NTFS +parseFs "swap" = Just LinuxSwap +parseFs _ = Nothing + data Eep = YesReallyFormatPartition -- | Formats a partition. |
