Module Fat_boot_sector

type t = {
oem_name : string;
bytes_per_sector : int;
sectors_per_cluster : int;
reserved_sectors : int;
number_of_fats : int;
number_of_root_dir_entries : int;
total_sectors : int32;
sectors_per_fat : int;
hidden_preceeding_sectors : int32;
}
val make : int64 -> t

make size creates a boot sector able to accommodate a disk of size size bytes

val sizeof : int
val marshal : Cstruct.t -> t -> unit
val unmarshal : Cstruct.t -> ( t, string ) Stdlib.result
val debug_print : t -> unit
val initial_cluster : t -> int

Return the sector number of the first cluster

val sectors_of_cluster : t -> int -> int list

Return a list of sectors corresponding to cluster n

val clusters : t -> int

Return the number of clusters

val detect_format : t -> ( Fat_format.t, string ) Stdlib.result
val fat_id : int

The FAT ID which will be written in both the boot sector and the 0th cluster of the FAT

val sectors_of_fat : t -> int list
val sectors_of_root_dir : t -> int list