propellor-5.3.1: property-based host configuration management in haskell

Safe HaskellNone
LanguageHaskell98

Propellor.Property.Parted.Types

Synopsis

Documentation

class PartedVal a where Source #

Minimal complete definition

pval

Methods

pval :: a -> String Source #

Instances

PartedVal Bool Source # 

Methods

pval :: Bool -> String Source #

PartedVal Fs Source # 

Methods

pval :: Fs -> String Source #

PartedVal PartFlag Source # 

Methods

pval :: PartFlag -> String Source #

PartedVal PartType Source # 

Methods

pval :: PartType -> String Source #

PartedVal TableType Source # 

Methods

pval :: TableType -> String Source #

data TableType Source #

Types of partition tables supported by parted.

Constructors

MSDOS 
GPT 
AIX 
AMIGA 
BSD 
DVH 
LOOP 
MAC 
PC98 
SUN 

Instances

Show TableType Source # 

Methods

showsPrec :: Int -> TableType -> ShowS

show :: TableType -> String

showList :: [TableType] -> ShowS

PartedVal TableType Source # 

Methods

pval :: TableType -> String Source #

data PartTable Source #

A disk's partition table.

Instances

Show PartTable Source # 

Methods

showsPrec :: Int -> PartTable -> ShowS

show :: PartTable -> String

showList :: [PartTable] -> ShowS

Monoid PartTable Source # 

data Partition Source #

A partition on the disk.

Constructors

Partition 

Fields

Instances

Show Partition Source # 

Methods

showsPrec :: Int -> Partition -> ShowS

show :: Partition -> String

showList :: [Partition] -> ShowS

mkPartition :: Maybe Fs -> PartSize -> Partition Source #

Makes a Partition with defaults for non-important values.

data PartType Source #

Type of a partition.

Constructors

Primary 
Logical 
Extended 

Instances

Show PartType Source # 

Methods

showsPrec :: Int -> PartType -> ShowS

show :: PartType -> String

showList :: [PartType] -> ShowS

PartedVal PartType Source # 

Methods

pval :: PartType -> String Source #

data PartSize Source #

Size of a partition.

Constructors

MegaBytes Integer 
Bytes Integer 

Instances

Show PartSize Source # 

Methods

showsPrec :: Int -> PartSize -> ShowS

show :: PartSize -> String

showList :: [PartSize] -> ShowS

Monoid PartSize Source # 

toPartSize :: ByteSize -> PartSize Source #

Rounds up to the nearest MegaByte.

toPartSize' :: (Double -> Integer) -> ByteSize -> PartSize Source #

newtype Alignment Source #

Partitions need to be aligned for optimal efficiency. The alignment is a number of bytes.

Constructors

Alignment ByteSize 

Instances

Eq Alignment Source # 

Methods

(==) :: Alignment -> Alignment -> Bool

(/=) :: Alignment -> Alignment -> Bool

Ord Alignment Source # 

Methods

compare :: Alignment -> Alignment -> Ordering

(<) :: Alignment -> Alignment -> Bool

(<=) :: Alignment -> Alignment -> Bool

(>) :: Alignment -> Alignment -> Bool

(>=) :: Alignment -> Alignment -> Bool

max :: Alignment -> Alignment -> Alignment

min :: Alignment -> Alignment -> Alignment

Show Alignment Source # 

Methods

showsPrec :: Int -> Alignment -> ShowS

show :: Alignment -> String

showList :: [Alignment] -> ShowS

safeAlignment :: Alignment Source #

4MiB alignment is optimal for inexpensive flash drives and is a good safe default for all drives.

data PartFlag Source #

Flags that can be set on a partition.

Instances

Show PartFlag Source # 

Methods

showsPrec :: Int -> PartFlag -> ShowS

show :: PartFlag -> String

showList :: [PartFlag] -> ShowS

PartedVal PartFlag Source # 

Methods

pval :: PartFlag -> String Source #