Recognizing appended partitions with partition offset 16

This commit is contained in:
Thomas Schmitt 2017-11-25 11:00:29 +01:00
parent dd6042a13e
commit 2d35076b36
2 changed files with 11 additions and 3 deletions

View File

@ -1660,7 +1660,7 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
char *cat_path= ""; char *cat_path= "";
struct elto_img_par *et_imgs= NULL; struct elto_img_par *et_imgs= NULL;
int elto_count= 0; int elto_count= 0;
uint32_t img_blocks= 0, mbr_parts_end= 0; uint32_t img_blocks= 0, mbr_parts_end= 0, iso_part_blocks;
struct FindjoB *job= NULL; struct FindjoB *job= NULL;
struct stat dir_stbuf; struct stat dir_stbuf;
IsoImage *image; IsoImage *image;
@ -1973,6 +1973,14 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
if(!have_protective_msdos) if(!have_protective_msdos)
appended_as_gpt= 0; appended_as_gpt= 0;
iso_part_blocks= img_blocks;
for(mbr_idx = 0; mbr_idx < mbr_count; mbr_idx++) {
if(mbrpts[mbr_idx].start_block == partition_offset * 4) {
iso_part_blocks= mbrpts[mbr_idx].block_count + partition_offset * 4;
break;
}
}
/* Second pass: scan for System Area info */ /* Second pass: scan for System Area info */
for(i= 0; i < line_count; i++) { for(i= 0; i < line_count; i++) {
buf[0]= 0; buf[0]= 0;
@ -2061,7 +2069,7 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
sscanf(contentpt, "%lu 0x%lx 0x%lx %lu %lu", sscanf(contentpt, "%lu 0x%lx 0x%lx %lu %lu",
&partno, &part_status, &part_type, &start_block, &num_blocks); &partno, &part_status, &part_type, &start_block, &num_blocks);
if(num_blocks > 0 && part_type != 0x00 && part_type != 0xee && if(num_blocks > 0 && part_type != 0x00 && part_type != 0xee &&
(img_blocks <= start_block || (iso_part_blocks <= start_block ||
(have_protective_msdos && img_blocks == mbr_parts_end && (have_protective_msdos && img_blocks == mbr_parts_end &&
partno > 1))) { partno > 1))) {
if(!appended_as_gpt) { if(!appended_as_gpt) {

View File

@ -1 +1 @@
#define Xorriso_timestamP "2017.11.17.143122" #define Xorriso_timestamP "2017.11.25.095955"