mod alloc_bitmap;
mod auth_subject_ids;
mod auth_tree;
mod crc32;
mod encryption_entities;
mod extent_ptr;
mod extents;
mod extents_layout;
mod fs;
mod image_header;
mod inode_extents_list;
mod inode_index;
mod journal;
mod keys;
mod layout;
mod leb128;
mod mkfs;
mod openfs;
mod read_authenticate_extent;
mod read_buffer;
mod read_inode_data;
mod read_preauth;
mod set_assoc_cache;
mod transaction;
mod write_blocks;
mod write_inode_data;
#[cfg(test)]
mod test;
use crate::fs::NvFsError;
use core::convert;
pub enum FormatError {
InvalidDeviceParameter = 1,
InvalidImageHeaderFormat = 2,
InvalidImageHeaderMagic = 3,
UnsupportedFormatVersion = 4,
InvalidImageHeaderChecksum = 5,
InvalidImageLayoutConfig = 6,
UnsupportedImageLayoutConfig = 7,
UnsupportedCryptoAlgorithm = 8,
InvalidSaltLength = 9,
IoBlockSizeNotSupportedByDevice = 10,
InvalidImageSize = 11,
InvalidAuthTreeConfig = 12,
UnsupportedAuthTreeConfig = 13,
UnalignedAuthTreeExtents = 14,
InvalidAuthTreeDimensions = 15,
InvalidAllocationBitmapFileConfig = 16,
UnalignedAllocationBitmapFileExtents = 17,
InvalidAllocationBitmapFileSize = 18,
InconsistentAllocBitmapFileExtents = 19,
InvalidDigestLength = 20,
InvalidFileSize = 21,
BlockOutOfRange = 22,
InvalidExtents = 23,
InvalidPadding = 24,
InvalidIndexConfig = 25,
InvalidIndexNode = 26,
InvalidIndexRootExtents = 27,
SpecialInodeMissing = 28,
UnalignedJournalExtents = 29,
InvalidJournalLogFieldTagEncoding = 30,
InvalidJournalLogFieldLengthEncoding = 31,
InvalidJournalLogFieldTag = 32,
JournalLogFieldLengthOverflow = 33,
IncompleteJournalLog = 34,
UnexpectedJournalLogField = 35,
JournalLogFieldLengthOutOfBounds = 36,
ExcessJournalLogFieldLength = 37,
InvalidJournalExtentsCoveringAuthDigestsFormat = 38,
InvalidJournalExtentsCoveringAuthDigestsEntry = 39,
UnexpectedJournalExtentsCoveringAuthDigestsEntry = 40,
InvalidJournalApplyWritesScriptFormat = 41,
InvalidJournalApplyWritesScriptEntry = 42,
InvalidJournalUpdateAuthDigestsScriptFormat = 43,
InvalidJournalUpdateAuthDigestsScriptEntry = 44,
InvalidJournalTrimsScriptFormat = 45,
InvalidJournalTrimsScriptEntry = 46,
}
impl convert::From<FormatError> for NvFsError {
fn from(value: FormatError) -> Self {
Self::FsFormatError(value as isize)
}
}
pub use fs::CocoonFs;
pub use layout::ImageLayout;
pub use mkfs::{MkFsFuture, WriteMkFsInfoHeaderFuture};
pub use openfs::OpenFsFuture;