AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
mbr.h
Go to the documentation of this file.
1#ifndef _FS_MBR_H
2#define _FS_MBR_H
3
4#include <core/system.h>
5
6struct mbr_part;
7struct mbr;
8
9/* The master boot record: a disk's first sector, with its partition
10 * table (fs/mbr.c reads it). */
11
12/* A partition entry's type for an unused entry; the MBR's signature. */
13#define MBR_TYPE_UNUSED 0x00
14#define MBR_BOOT_SIGNATURE 0xAA55
15
31
33struct mbr {
34 /* the boot loader's code */
38
39 /* the partition table */
40 struct mbr_part ptab[4];
42} __packed;
43
44#endif /* ! _FS_MBR_H */
#define __packed
Definition system.h:30
unsigned int uint32_t
Definition stddef.h:22
unsigned char uint8_t
Definition stddef.h:20
unsigned short int uint16_t
Definition stddef.h:21
A partition table entry.
Definition mbr.h:17
uint32_t start_lba
Definition mbr.h:28
uint32_t sectors_count
Definition mbr.h:29
uint8_t type
Definition mbr.h:23
struct mbr_part::@366002065263140324102276265346331217201127360205 end_chs
struct mbr_part::@150037107302234200243332173256162073111374016210 start_chs
uint8_t status
Definition mbr.h:18
The master boot record.
Definition mbr.h:33
uint16_t boot_signature
Definition mbr.h:41
struct mbr_part ptab[4]
Definition mbr.h:40
uint32_t disk_signiture
Definition mbr.h:36
uint8_t bootloader[440]
Definition mbr.h:35
uint16_t copy_protected
Definition mbr.h:37