mirror of
https://github.com/CTCaer/hekate
synced 2024-12-22 19:31:12 +00:00
nyx: tools: use actual gpt entries num in part manager
This commit is contained in:
parent
c51877d588
commit
62d68b33c3
1 changed files with 2 additions and 2 deletions
|
@ -451,8 +451,8 @@ static void _prepare_and_flash_mbr_gpt()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set final GPT header parameters.
|
// Set final GPT header parameters.
|
||||||
gpt->header.num_part_ents = 128;
|
gpt->header.num_part_ents = gpt_idx;
|
||||||
gpt->header.part_ents_crc32 = crc32_calc(0, (const u8 *)gpt->entries, sizeof(gpt_entry_t) * 128);
|
gpt->header.part_ents_crc32 = crc32_calc(0, (const u8 *)gpt->entries, sizeof(gpt_entry_t) * gpt->header.num_part_ents);
|
||||||
gpt->header.crc32 = 0; // Set to 0 for calculation.
|
gpt->header.crc32 = 0; // Set to 0 for calculation.
|
||||||
gpt->header.crc32 = crc32_calc(0, (const u8 *)&gpt->header, gpt->header.size);
|
gpt->header.crc32 = crc32_calc(0, (const u8 *)&gpt->header, gpt->header.size);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue