summaryrefslogtreecommitdiff
path: root/src/kernel/gpt.c
diff options
context:
space:
mode:
authorBenji Dial <Benji3.141@gmail.com>2019-12-27 18:49:11 -0500
committerBenji Dial <Benji3.141@gmail.com>2019-12-27 18:49:11 -0500
commit7c7fd36bea1eac4d0fa7bd628a53fff7d2e60917 (patch)
tree9e2fb97dd631170ef6a917740016573231f7634f /src/kernel/gpt.c
parent58b5c8ba417fe99c01d9a48731b887ce434e797e (diff)
downloadportland-os-7c7fd36bea1eac4d0fa7bd628a53fff7d2e60917.tar.gz
doing iso9660 before gpt, making partition detection expandable
Diffstat (limited to 'src/kernel/gpt.c')
-rw-r--r--src/kernel/gpt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/kernel/gpt.c b/src/kernel/gpt.c
index 32185eb..39add3a 100644
--- a/src/kernel/gpt.c
+++ b/src/kernel/gpt.c
@@ -29,10 +29,10 @@ bool gpt_parse_pt(uint8_t dn, uint8_t *buffer) {
uint32_t part_entry_size = head->part_size;
struct gpt_entry *as_entries = (struct gpt_entry *)buffer;
for (uint8_t i = 0; i < pi->n_partitions; ++i) {
- if (!(i % 8))
- read_sectors(dn, 2 + i / 4, 2, buffer);
- pi->partition_sizes[i] = ((as_entries[i % 8].last_sector + 1) >> 1) - (pi->partition_offsets[i] = ((as_entries[i % 8].sector) >> 1));
- switch (as_entries[i % 8].id.le) {
+ if (!(i % 16))
+ read_sectors(dn, 2 + i / 4, 4, buffer);
+ pi->partition_sizes[i] = ((as_entries[i % 16].last_sector + 1) >> 1) - (pi->partition_offsets[i] = ((as_entries[i % 16].sector) >> 1));
+ switch (as_entries[i % 16].id.le) {
//TODO
}
}