Continuing GPT inspection even if reading of GPT backup fails

This commit is contained in:
Thomas Schmitt 2014-11-11 12:28:23 +01:00
parent af23ad0f90
commit 2fe0bf511b

View File

@ -4023,15 +4023,16 @@ int iso_analyze_gpt_backup(IsoImage *image, IsoDataSource *src, int flag)
sprintf(comments + strlen(comments), sprintf(comments + strlen(comments),
"Cannot read header block at 2k LBA %.f, ", "Cannot read header block at 2k LBA %.f, ",
(double) iso_block); (double) iso_block);
goto ex; ret = 0; goto ex;
} }
head = buf + (sai->gpt_backup_lba % 4) * 512; head = buf + (sai->gpt_backup_lba % 4) * 512;
ret = iso_seems_usable_gpt_head(head, 0); ret = iso_seems_usable_gpt_head(head, 0);
if (ret == 0) if (ret == 0)
strcat(comments, strcat(comments,
"Not a GPT 1.0 header of 92 bytes for 128 bytes per entry, "); "Not a GPT 1.0 header of 92 bytes for 128 bytes per entry, ");
if (ret <= 0) if (ret <= 0) {
goto ex; ret = 0; goto ex;
}
/* Check head CRC */ /* Check head CRC */
found_crc = iso_read_lsb(head + 16, 4); found_crc = iso_read_lsb(head + 16, 4);
@ -4082,7 +4083,7 @@ int iso_analyze_gpt_backup(IsoImage *image, IsoDataSource *src, int flag)
sprintf(comments + strlen(comments), sprintf(comments + strlen(comments),
"Cannot read array block at 2k LBA %.f, ", "Cannot read array block at 2k LBA %.f, ",
(double) iso_block); (double) iso_block);
goto ex; ret = 0; goto ex;
} }
} }
part_array = buf + (part_start % 4) * 512; part_array = buf + (part_start % 4) * 512;