:: commit 6bbc31f2327b8c3326bc361c33cac6eb5b03cf0e

mintsuki <mintsuki@protonmail.com> — 2021-03-15 01:22

parents: 0bdc5da61e

disk: Actually wire in the max_partition logic

diff --git a/stage23/drivers/disk.s2.c b/stage23/drivers/disk.s2.c
index 27ed3868..b0f6094c 100644
--- a/stage23/drivers/disk.s2.c
+++ b/stage23/drivers/disk.s2.c
@@ -157,6 +157,7 @@ void disk_create_index(void) {
         block->sector_size = drive_params.bytes_per_sect;
         block->first_sect = 0;
         block->sect_count = drive_params.lba_count;
+        block->max_partition = -1;
 
         // The medium could not be present (e.g.: CD-ROMs)
         // Do a test run to see if we can actually read it
@@ -180,6 +181,8 @@ void disk_create_index(void) {
                 continue;
 
             volume_index[volume_index_i++] = p;
+
+            block->max_partition++;
         }
     }
 }
@@ -360,6 +363,7 @@ void disk_create_index(void) {
         block->sector_size = drive->Media->BlockSize;
         block->first_sect = 0;
         block->sect_count = drive->Media->LastBlock + 1;
+        block->max_partition = -1;
 
         volume_index[volume_index_i++] = block;
 
@@ -373,6 +377,8 @@ void disk_create_index(void) {
                 continue;
 
             volume_index[volume_index_i++] = p;
+
+            block->max_partition++;
         }
     }
 }
tab: 248 wrap: offon