Issue iso_mbr_part_type info with -report_system_area "cmd" and "as_mkisofs"
This commit is contained in:
parent
e8b387c54d
commit
e74b04a1e7
@ -1647,9 +1647,10 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
|
|||||||
int cared_for_sparc= 0, have_hfsplus= 0;
|
int cared_for_sparc= 0, have_hfsplus= 0;
|
||||||
int have_sysarea= 0, ptable_killer, imported_iso, have_alpha_ldr_path= 0;
|
int have_sysarea= 0, ptable_killer, imported_iso, have_alpha_ldr_path= 0;
|
||||||
int have_protective_msdos= 0, appended_partition= 0, part_like_isohybrid= 0;
|
int have_protective_msdos= 0, appended_partition= 0, part_like_isohybrid= 0;
|
||||||
|
int iso_mbr_part_type= -1;
|
||||||
unsigned int prev_pltf= 0;
|
unsigned int prev_pltf= 0;
|
||||||
unsigned long int sa_options= 0, partno, id_tag, perms, start_cyl, num_blocks;
|
unsigned long int sa_options= 0, partno, id_tag, perms, start_cyl, num_blocks;
|
||||||
unsigned long int part_status, part_type, start_block;
|
unsigned long int part_status, part_type, start_block, partition_offset= 0;
|
||||||
uint32_t high_block= 0;
|
uint32_t high_block= 0;
|
||||||
char name[24], *textpt, *contentpt, *buf= NULL;
|
char name[24], *textpt, *contentpt, *buf= NULL;
|
||||||
char **lines= NULL;
|
char **lines= NULL;
|
||||||
@ -1747,6 +1748,10 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
|
|||||||
} else if(strcmp(name, "ISO image size/512 :") == 0) {
|
} else if(strcmp(name, "ISO image size/512 :") == 0) {
|
||||||
img_blocks= num[0];
|
img_blocks= num[0];
|
||||||
|
|
||||||
|
} else if(strcmp(name, "Partition offset :") == 0 &&
|
||||||
|
(num[0] == 0 || num[0] == 16)) {
|
||||||
|
partition_offset= num[0];
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1895,6 +1900,9 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
|
|||||||
mbrpts[idx].block_count= num_blocks;
|
mbrpts[idx].block_count= num_blocks;
|
||||||
if(num_blocks > 0 && start_block + num_blocks > mbr_parts_end)
|
if(num_blocks > 0 && start_block + num_blocks > mbr_parts_end)
|
||||||
mbr_parts_end= start_block + num_blocks;
|
mbr_parts_end= start_block + num_blocks;
|
||||||
|
if(start_block == partition_offset * 4 &&
|
||||||
|
(start_block + num_blocks) >= high_block * 4 && iso_mbr_part_type < 0)
|
||||||
|
iso_mbr_part_type = part_type;
|
||||||
|
|
||||||
} else if(strcmp(name, "MBR partition path :") == 0) {
|
} else if(strcmp(name, "MBR partition path :") == 0) {
|
||||||
idx= num[0] - 1;
|
idx= num[0] - 1;
|
||||||
@ -2413,6 +2421,15 @@ static int Xorriso_scan_report_lines(struct XorrisO *xorriso,
|
|||||||
Xorriso_record_cmd_linE
|
Xorriso_record_cmd_linE
|
||||||
did_sysarea= 1;
|
did_sysarea= 1;
|
||||||
}
|
}
|
||||||
|
if(iso_mbr_part_type >= 0) {
|
||||||
|
if(mkisofs)
|
||||||
|
sprintf(buf, "-iso_mbr_part_type 0x%2.2x",
|
||||||
|
(unsigned int) iso_mbr_part_type);
|
||||||
|
else
|
||||||
|
sprintf(buf, "-boot_image any iso_mbr_part_type=0x%2.2x",
|
||||||
|
(unsigned int) iso_mbr_part_type);
|
||||||
|
Xorriso_record_cmd_linE
|
||||||
|
}
|
||||||
|
|
||||||
/* Issue commands related to El Torito */
|
/* Issue commands related to El Torito */
|
||||||
if(elto_count <= 0)
|
if(elto_count <= 0)
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2017.08.07.134036"
|
#define Xorriso_timestamP "2017.08.24.102256"
|
||||||
|
Loading…
Reference in New Issue
Block a user