mirror of
https://github.com/linux-msm/qbootctl
synced 2024-11-23 14:43:29 +08:00
make disk->hdr_bak actually be the GPT backup header
I do not know who thought this should be a "backup" copy of the primary GPT header...
This commit is contained in:
parent
75e30f8d09
commit
7a5d5ee40e
@ -639,7 +639,8 @@ int gpt_disk_get_disk_info(const char *dev, struct gpt_disk *dsk)
|
||||
gpt_header_size = GET_4_BYTES(disk->hdr + HEADER_SIZE_OFFSET);
|
||||
// FIXME: pointer offsets crc bleh
|
||||
disk->hdr_crc = crc32(0, disk->hdr, gpt_header_size);
|
||||
disk->hdr_bak = gpt_get_header(dev, PRIMARY_GPT);
|
||||
|
||||
disk->hdr_bak = gpt_get_header(dev, SECONDARY_GPT);
|
||||
if (!disk->hdr_bak) {
|
||||
fprintf(stderr, "%s: Failed to get backup header\n", __func__);
|
||||
goto error;
|
||||
|
Loading…
Reference in New Issue
Block a user