Go to the documentation of this file.
23 "MSF magic header doesn't match");
27 "Unsupported block size.");
32 "Directory size is not multiple of 4.");
44 "Too many directory blocks.");
48 "Block 0 is reserved");
52 "Block map address is invalid.");
55 return make_error<MSFError>(
57 "The free block map isn't at block 1 or block 2.");
63 bool IncludeUnusedFpmData,
76 if (IncludeUnusedFpmData)
uint32_t alternateFpmBlock() const
std::vector< support::ulittle32_t > Blocks
This is an optimization pass for GlobalISel generic memory operations.
uint32_t getNumFpmIntervals(uint32_t BlockSize, uint32_t NumBlocks, bool IncludeUnusedFpmData, int FpmNumber)
Given an MSF with the specified block size and number of blocks, determine how many pieces the specif...
uint64_t bytesToBlocks(uint64_t NumBytes, uint64_t BlockSize)
static ErrorSuccess success()
Create a success value.
support::ulittle32_t NumDirectoryBytes
Merge contiguous icmps into a memcmp
bool isValidBlockSize(uint32_t Size)
MSFStreamLayout getFpmStreamLayout(const MSFLayout &Msf, bool IncludeUnusedFpmData=false, bool AltFpm=false)
Determine the layout of the FPM stream, given the MSF layout.
Error validateSuperBlock(const SuperBlock &SB)
support::ulittle32_t NumBlocks
uint64_t divideCeil(uint64_t Numerator, uint64_t Denominator)
Returns the integer ceil(Numerator / Denominator).
uint32_t getFpmIntervalLength(const MSFLayout &L)
support::ulittle32_t FreeBlockMapBlock
static const char Magic[]
uint32_t mainFpmBlock() const
char MagicBytes[sizeof(Magic)]
support::ulittle32_t BlockSize
Lightweight error class with error context and mandatory checking.
support::ulittle32_t BlockMapAddr
Describes the layout of a stream in an MSF layout.