Safe Haskell | Safe-Inferred |
---|
Types for dealing with the old-fasioned and modern Master Boot Records. This does not cover things like the GUID partition table or any of the weird variations like AAP or NEWLDR.
- data Timestamp = Timestamp {}
- data CHS = CHS {}
- data PartitionEntry = PartitionEntry {}
- nullPartition :: PartitionEntry
- bootable :: PartitionEntry -> Bool
- data PartitionTable = PartitionTable {}
- nullPartitionTable :: PartitionTable
- data BootRecord = BootRecord {}
- emptyBootloader :: ByteString
- nullBootRecord :: BootRecord
- getTimestamp :: BootRecord -> Maybe Timestamp
- getDiskSignature :: BootRecord -> Maybe Word32
Documentation
The so-called mystery bytes on Windows 95B, 98, 98SE, and Me -- in fact, they're a timestamp and a drive number. See http:thestarman.pcministry.comasmmbr/mystery.htm .
A representation of the cylinderheadsector address in MBRs.
data PartitionEntry Source
Partition entries themselves are somewhat intricate.
PartitionEntry | |
|
nullPartition :: PartitionEntrySource
The empty partition table entry.
bootable :: PartitionEntry -> BoolSource
Whether this partition entry is marked bootable.
data PartitionTable Source
An MBR partition table consists of (up to?) four partition entries.
nullPartitionTable :: PartitionTableSource
The empty partition table.
data BootRecord Source
The structure of a Master Boot Record is as follows...
BootRecord | |
|
emptyBootloader :: ByteStringSource
The empty bootloader -- 446 empty bytes.
nullBootRecord :: BootRecordSource
The empty boot record.
getTimestamp :: BootRecord -> Maybe TimestampSource
Get the completely-optional, obsolete disk timestamp used by some old versions of Windows.
getDiskSignature :: BootRecord -> Maybe Word32Source
Get the optional disk signature from a Bootrecord's bootloader.