9#ifndef MAXOS_FILESYSTEM_PARTITION_MSDOS_H
10#define MAXOS_FILESYSTEM_PARTITION_MSDOS_H
19namespace MaxOS::filesystem::partition {
87 PARTITIONMAGIC_RECOVERY,
173 FAULT_TOLERANT_FAT32,
180 FREEFDISK_FAT16_LARGE,
189 FREEFDISK_EXTENDED_LBA,
249 OLD_MULTIUSER_DOS_FAT12,
252 OLD_MULTIUSER_DOS_FAT16,
253 OLD_MULTIUSER_DOS_EXTENDED,
254 OLD_MULTIUSER_DOS_FAT16_LARGE,
259 DIGITAL_RESEARCH_CPM,
265 SPEEDSTOR_FAT_EXTENDED,
322 } partition_table_entry_t;
333 uint8_t bootloader[440];
341 } master_boot_record_t;
Generic Disk, handles the reading and writing of data to the hard drive.
Handles mounting of partitions documented in an MSDOS partition table.
static void mount_partitions(drivers::disk::Disk *disk)
read the partition table of a given hard disk
Defines a generic Disk driver for reading and writing data to disk drives.
Defines structures and enums for the Extended 2 (ext2) filesystem format and relevant Filesystem,...
Defines structures and constants for the File Allocation Table 32 (FAT32) filesystem format and the r...
PartitionType
Credit: http://www.osdever.net/documents/pdf/partitiontypes.pdf.
Stores information about the master boot record.
uint16_t magic
The magic number that identifies this as a valid MBR (0xAA55)
uint32_t disk_signature
Unique disk signature (optional)
uint16_t unused
Reserved (usually zero)
Stores information about a partition.
uint8_t end_head
The last head of the partition.
uint8_t start_head
The starting head of the partition.
uint32_t start_LBA
The starting LBA of the partition.
uint16_t start_cylinder
The starting cylinder of the partition.
uint8_t start_sector
The first sector of the partition.
uint8_t bootable
Is this partition bootable? (0x80 = bootable, 0x00 = not bootable)
uint16_t end_cylinder
The last cylinder of the partition.
uint32_t length
The length of the partition in sectors.
uint8_t end_sector
The last sector of the partition.
uint8_t type
The partition type (see PartitionType enum)
Defines a Virtual File System (VFS) class for managing multiple filesystems and providing a unified i...