Bug fix: Data files named /boot.catalog or ./boot.cat could be left out of the emerging ISO if the boot catalog was set to be hidden
This commit is contained in:
parent
4eb98d7911
commit
098d4f8ff5
@ -2672,7 +2672,7 @@ problem_handler_2:;
|
|||||||
xorriso->system_area_options= xorriso->system_area_options | (1 << 17);
|
xorriso->system_area_options= xorriso->system_area_options | (1 << 17);
|
||||||
|
|
||||||
} else if(strcmp(argpt, "--boot-catalog-hide")==0) {
|
} else if(strcmp(argpt, "--boot-catalog-hide")==0) {
|
||||||
xorriso->boot_image_cat_hidden|= 3;
|
xorriso->boot_image_cat_hidden|= 7;
|
||||||
} else if(strcmp(argpt, "-partition_offset") == 0 ||
|
} else if(strcmp(argpt, "-partition_offset") == 0 ||
|
||||||
strcmp(argpt, "-partition_sec_hd") == 0 ||
|
strcmp(argpt, "-partition_sec_hd") == 0 ||
|
||||||
strcmp(argpt, "-partition_hd_cyl") == 0 ||
|
strcmp(argpt, "-partition_hd_cyl") == 0 ||
|
||||||
@ -2769,7 +2769,8 @@ problem_handler_boot:;
|
|||||||
continue;
|
continue;
|
||||||
goto ex;
|
goto ex;
|
||||||
}
|
}
|
||||||
if(with_boot_image && with_cat_path == 0)
|
if(with_boot_image && with_cat_path == 0 &&
|
||||||
|
!(xorriso->boot_image_cat_hidden & 1))
|
||||||
strcpy(xorriso->boot_image_cat_path, "/boot.catalog");
|
strcpy(xorriso->boot_image_cat_path, "/boot.catalog");
|
||||||
/* The boot catalog has to be hidden separately */
|
/* The boot catalog has to be hidden separately */
|
||||||
if(xorriso->boot_image_cat_path[0]) {
|
if(xorriso->boot_image_cat_path[0]) {
|
||||||
|
@ -621,7 +621,7 @@ int Xorriso_attach_boot_image(struct XorrisO *xorriso, int flag)
|
|||||||
int emul, platform_id;
|
int emul, platform_id;
|
||||||
off_t load_size;
|
off_t load_size;
|
||||||
struct stat stbuf;
|
struct stat stbuf;
|
||||||
int hflag= 0, is_interval= 0;
|
int hflag= 0, is_interval= 0, cat_tries;
|
||||||
|
|
||||||
if(xorriso->boot_image_bin_path[0] == 0 && !(flag & 2)) {
|
if(xorriso->boot_image_bin_path[0] == 0 && !(flag & 2)) {
|
||||||
|
|
||||||
@ -705,9 +705,19 @@ int Xorriso_attach_boot_image(struct XorrisO *xorriso, int flag)
|
|||||||
cpt++;
|
cpt++;
|
||||||
}
|
}
|
||||||
strcpy(cpt, "boot.cat");
|
strcpy(cpt, "boot.cat");
|
||||||
|
if(xorriso->boot_image_cat_hidden & 1) {
|
||||||
|
/* Find a name which does not yet exist */
|
||||||
|
ret= 1;
|
||||||
|
for(cat_tries= 1; ret > 0 && cat_tries < 1000000; cat_tries++) {
|
||||||
|
ret= Xorriso_node_from_path(xorriso, image,
|
||||||
|
xorriso->boot_image_cat_path, &node, 1);
|
||||||
|
if(ret > 0)
|
||||||
|
sprintf(cpt, "real%d_boot.cat", cat_tries);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ret= Xorriso_node_from_path(xorriso, image, xorriso->boot_image_cat_path,
|
ret= Xorriso_node_from_path(xorriso, image, xorriso->boot_image_cat_path,
|
||||||
&node, 1);
|
&node, 1);
|
||||||
if(ret > 0) {
|
if(ret > 0) {
|
||||||
if(!xorriso->do_overwrite) {
|
if(!xorriso->do_overwrite) {
|
||||||
sprintf(xorriso->info_text,
|
sprintf(xorriso->info_text,
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2022.12.11.182322"
|
#define Xorriso_timestamP "2022.12.17.190005"
|
||||||
|
Loading…
Reference in New Issue
Block a user