From 266fa4a0d40e687281c85de17f68c57536ac502c Mon Sep 17 00:00:00 2001 From: apio Date: Sat, 17 Jun 2023 19:50:58 +0200 Subject: [PATCH] kernel: Start counting partition numbers at 1 This makes more sense for the end user. --- kernel/src/fs/GPT.cpp | 2 +- kernel/src/fs/MBR.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/src/fs/GPT.cpp b/kernel/src/fs/GPT.cpp index 58142faa..f9a8e922 100644 --- a/kernel/src/fs/GPT.cpp +++ b/kernel/src/fs/GPT.cpp @@ -41,7 +41,7 @@ namespace GPT u64 partition_table_start = header.partition_table_lba * GPT_SECTOR_SIZE; - u32 partition_index = 0; + u32 partition_index = 1; auto* table = TRY(make_array(header.num_partitions)); auto guard = make_scope_guard([table] { delete[] table; }); diff --git a/kernel/src/fs/MBR.cpp b/kernel/src/fs/MBR.cpp index 0aad45d4..369b1ef8 100644 --- a/kernel/src/fs/MBR.cpp +++ b/kernel/src/fs/MBR.cpp @@ -59,7 +59,7 @@ namespace MBR if (hdr.signature[0] != MBR_SIGNATURE_1 || hdr.signature[1] != MBR_SIGNATURE_2) return false; - u32 partition_index = 0; + u32 partition_index = 1; for (int i = 0; i < 4; i++) {