Module media
Expand description
Helpers for the on-flash UBI structures in ubi-media.h.
ConstantsΒ§
- HEADER_
CRC π - Offset of the CRC in both headers. The CRC covers the bytes before it.
- HEADER_
SIZE π - Size of the erase counter header and the volume identifier header.
- MAX_
VOLUMES π - Number of user volumes. Internal volumes have IDs from
super::LAYOUT_VOLUME_IDon. - VERSION π
- The only UBI version.
FunctionsΒ§
- array π
- Returns
Nbytes atoffset. - be_u32 π
- be_u64 π
- check_
crc π - Checks the CRC at
offsetagainst the bytes before it. - checked_
header π - Returns the first header of
dataafter checking its magic number and its CRC, in the order of the kernel. - field π
- Returns a
FormatError::Field. - flag π
- Converts a flag that must be 0 or 1.
- is_
erased π - Returns whether all bytes are 0xFF, the value of erased flash.
- non_
negative π - Returns
valueif the kernel, which reads it as a signed 32-bit integer, sees a value that isnβt negative. - put π
- Copies
bytesintobufferatoffset. - seal_
header π - Stores the magic number, the version and the CRC of a header.