:: commit 495e1a131cdb1d5f4349b4deb8395b6052dcde37

mintsuki <mintsuki@protonmail.com> — 2021-03-17 18:31

parents: 2e12cc0a40

limine-install: Also zero out secondary GPT header

diff --git a/limine-install/limine-install.c b/limine-install/limine-install.c
index 2fac6602..e1100feb 100644
--- a/limine-install/limine-install.c
+++ b/limine-install/limine-install.c
@@ -414,6 +414,11 @@ int main(int argc, char *argv[]) {
                     gpt_header.partition_entry_lba * lb_size + i * gpt_header.size_of_partition_entry,
                     gpt_header.size_of_partition_entry);
             }
+            for (size_t i = max_partition_entry_used + 1; i < new_partition_entry_count; i++) {
+                device_write(empty,
+                    secondary_gpt_header.partition_entry_lba * lb_size + i * secondary_gpt_header.size_of_partition_entry,
+                    secondary_gpt_header.size_of_partition_entry);
+            }
             free(empty);
 
             uint8_t *partition_array =
tab: 248 wrap: offon