From 019dddccba389012601eb9da19a0d04e0544c8d8 Mon Sep 17 00:00:00 2001 From: mintsuki Date: Fri, 28 Jan 2022 16:25:07 +0100 Subject: [PATCH] limine-install: Fix issue introduced in 55166fd where GPT checksum would corrupt --- limine-install/limine-install.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/limine-install/limine-install.c b/limine-install/limine-install.c index 87096554..068e8118 100644 --- a/limine-install/limine-install.c +++ b/limine-install/limine-install.c @@ -559,7 +559,7 @@ int main(int argc, char *argv[]) { gpt_header.partition_entry_array_crc32 = crc32_partition_array; gpt_header.number_of_partition_entries = new_partition_entry_count; gpt_header.crc32 = 0; - gpt_header.crc32 = crc32(&gpt_header, sizeof(struct gpt_table_header)); + gpt_header.crc32 = crc32(&gpt_header, 92); device_write(&gpt_header, lb_size, sizeof(struct gpt_table_header)); @@ -568,8 +568,7 @@ int main(int argc, char *argv[]) { secondary_gpt_header.number_of_partition_entries = new_partition_entry_count; secondary_gpt_header.crc32 = 0; - secondary_gpt_header.crc32 = - crc32(&secondary_gpt_header, sizeof(struct gpt_table_header)); + secondary_gpt_header.crc32 = crc32(&secondary_gpt_header, 92); device_write(&secondary_gpt_header, lb_size * gpt_header.alternate_lba, sizeof(struct gpt_table_header));