]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
partition: add MBR parser (Etapa 2)
authorTulio A M Mendes <[email protected]>
Tue, 26 May 2026 03:56:35 +0000 (00:56 -0300)
committerTulio A M Mendes <[email protected]>
Wed, 3 Jun 2026 04:02:35 +0000 (01:02 -0300)
commit61b888c27d8feab0c7cc81511ab7b7bf1948b7db
tree5412875564ff430d5a6b8fedb2054a00656102ed
parent64187b00b69ecaaea22343fcd85610d8a4f89db8
partition: add MBR parser (Etapa 2)

- Added mbr_partition_entry_t structure for 16-byte partition entries
- Implemented partition_scan_mbr() to read and parse MBR sector
- Validates MBR signature (0xAA55) at offset 510
- Parses 4 primary partition entries starting at offset 446
- Skips empty partitions (type 0)
- Generates partition names (e.g. hda1, vda2)
- Silently skips devices without valid MBR (no errors)
- Tests: 124/124 PASS
include/partition.h
src/kernel/init.c
src/kernel/partition.c