A Rust library to parse the master boot record (MBR).
no_stdwithoutalloc- No
unsafecode - Very minimal
- Read the first 512 bytes of the disk
- Use
zerocopyto safely transmute the 512 bytes into aGenericMbr - Access the
partition_entriesfield - Use the
is_emptyandpartition_typemethods to check if the partition exists and is the format you are expecting (typically FAT) - Use the
start_sectorandn_sectorsmethods to know the range of the partition - Optional: you can use the
pure_fatlibrary to read folders and files from the partition
- Reading an SD card formatted with MBR in embedded