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...
main
Caleb Connolly 1 year ago
parent 75e30f8d09
commit 7a5d5ee40e
No known key found for this signature in database
GPG Key ID: 0583312B195F64B6
  1. 3
      gpt-utils.cpp

@ -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…
Cancel
Save