BPBExtension32

Struct BPBExtension32 

Source
pub struct BPBExtension32 {
    pub fat_size_32: [u8; 4],
    pub flags: [u8; 2],
    pub fs_version: [u8; 2],
    pub root_cluster: [u8; 4],
    pub fs_info: [u8; 2],
    pub bk_boot_sec: [u8; 2],
    pub reserved: [u8; 12],
}
Expand description

Introduced with Windows 95, appears starting at byte 36 of the boot sector.

Fields§

§fat_size_32: [u8; 4]

32-bit version of fat_size

§flags: [u8; 2]

bits 0-3 = active FAT, 4-6 reserved, 7 = disable mirroring, 8-15 reserved

§fs_version: [u8; 2]

high byte = major, low byte = minor

§root_cluster: [u8; 4]

cluster number of the root directory, usually 2

§fs_info: [u8; 2]

sector number of FSINFO structure, usually 1. The boot sectors and backup boot sectors both point to the same FSInfo sector, even though a backup FSInfo exists in the backup sectors.

§bk_boot_sec: [u8; 2]

if non-zero, indicates sector number of the backup boot record, usually 6. This is the start of the backup boot record, which may be multiple sectors.

§reserved: [u8; 12]

reserved, set to 0

Trait Implementations§

Source§

impl DiskStruct for BPBExtension32

Source§

fn new() -> Self
where Self: Sized,

create a structure with all zeros, requires concrete type
Source§

fn to_bytes(&self) -> Vec<u8>

flatten the structure into a byte stream
Source§

fn update_from_bytes(&mut self, dat: &[u8]) -> Result<(), DiskStructError>

update a structure from a byte stream, OK to use on trait objects
Source§

fn from_bytes(dat: &[u8]) -> Result<Self, DiskStructError>
where Self: Sized,

create a structure from a byte stream, requires concrete type
Source§

fn len(&self) -> usize

the length in bytes of the structure
Source§

fn from_bytes_adv( bytes: &[u8], ptr: &mut usize, ) -> Result<Self, DiskStructError>
where Self: Sized,

convenience function to call from_bytes and increment ptr by len()

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.