12using namespace MaxOS::common;
13using namespace MaxOS::filesystem;
14using namespace MaxOS::filesystem::partition;
15using namespace MaxOS::filesystem::format;
16using namespace MaxOS::drivers::disk;
31 if (
mbr.magic != 0xAA55) {
40 for (
auto &entry:
mbr.primary_partition) {
50 case PartitionType::EMPTY:
54 case PartitionType::FAT32:
59 case PartitionType::LINUX_EXT2:
65 Logger::Out() <<
"Unknown or unimplemented partition type: 0x" << (
uint64_t) entry.type <<
"\n";
static Logger DEBUG()
Gets active logger set to DEBUG level.
static Logger & Out()
Gets the active logger.
static Logger WARNING()
Gets active logger set to WARNING level.
Wrapper class for a region of bytes in memor in an attempt to add some memory safety....
Stores the left, top, width and height of a rectangle.
Generic Disk, handles the reading and writing of data to the hard drive.
void read(uint32_t sector, common::buffer_t *data_buffer)
read data from the disk into a buffer (max capacity 512 bytes)
Combines all the filesystems across the partitions on each disk into a single filesystems and exposes...
static VirtualFileSystem * current_file_system()
Get the active virtual file system.
static void mount_partitions(drivers::disk::Disk *disk)
read the partition table of a given hard disk
Defines structures and enums for handling Microsoft - Desktop Operating System (MS-DOS) partitions in...
PartitionType
Credit: http://www.osdever.net/documents/pdf/partitiontypes.pdf.
Stores information about the master boot record.