Structures added for MasterBootRecord support

This commit is contained in:
Nigel Barink 2021-12-23 17:43:25 +01:00
parent bd5d3f5d49
commit 9173b90eb1
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#pragma once
#include <stdint.h>
#include "PartitionTableEntry.h"
struct MBR {
uint8_t code [440];
uint32_t uniqueID;
uint16_t Reserved;
PartitionTableEntry TableEntries[4];
uint16_t ValidBootsector;
}__attribute__((packed));

View File

@ -0,0 +1,11 @@
#pragma once
#include <stdint.h>
struct PartitionTableEntry{
uint8_t driveAttribute;
uint8_t CHS_start_address [3];
uint8_t PartitionType;
uint8_t CHS_lastSector_Address[3];
uint32_t LBA_partition_start;
uint32_t Number_sectors_inPartition;
}__attribute__((packed));