#[repr(C)]
pub struct FSInfo { lead_sig: u32, reserved1: [u8; 480], struc_sig: u32, free_count: u32, nxt_free: u32, reserved2: [u8; 12], trail_sig: u32, }
Expand description

On-disk data structure. The direct creation/storage of this struct should avoided since the size of reserved area is rather big.

Fields

lead_sig: u32

Value 0x41615252. This lead signature is used to validate that this is in fact an FSInfo sector.

reserved1: [u8; 480]

The reserved area should be empty.

struc_sig: u32

Value 0x61417272. Another signature that is more localized in the sector to the location of the fields that are used.

free_count: u32

Contains the last known free cluster count on the volume. If the value is 0xFFFFFFFF, then the free count is unknown and must be computed. Any other value can be used, but is not necessarily correct. It should be range checked at least to make sure it is <= volume cluster count.

nxt_free: u32

This is a hint for the FAT driver. It indicates the cluster number at which the driver should start looking for free clusters. Because a FAT32 FAT is large, it can be rather time consuming if there are a lot of allocated clusters at the start of the FAT and the driver starts looking for a free cluster starting at cluster 2. Typically this value is set to the last cluster number that the driver allocated. If the value is 0xFFFFFFFF, then there is no hint and the driver should start looking at cluster 2. Any other value can be used, but should be checked first to make sure it is a valid cluster number for the volume.

reserved2: [u8; 12]trail_sig: u32

Value 0xAA550000. This trail signature is used to validate that this is in fact an FSInfo sector. Note that the high 2 bytes of this value which go into the bytes at offsets 510 and 511 match the signature bytes used at the same offsets in sector 0.

Implementations

Free a cluster if it is marked used.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.