New -boot_image bootspec cat_hidden=
This commit is contained in:
@ -331,7 +331,7 @@ int Xorriso_attach_boot_image(struct XorrisO *xorriso, int flag)
|
||||
ElToritoBootImage *bootimg;
|
||||
enum eltorito_boot_media_type emul_type= ELTORITO_NO_EMUL;
|
||||
char *bin_path;
|
||||
int emul, platform_id;
|
||||
int emul, platform_id, hide_attr;
|
||||
off_t load_size;
|
||||
struct stat stbuf;
|
||||
int hflag= 0;
|
||||
@ -437,8 +437,17 @@ int Xorriso_attach_boot_image(struct XorrisO *xorriso, int flag)
|
||||
iso_image_remove_boot_image(image);
|
||||
ret= iso_image_set_boot_image(image, bin_path, emul_type,
|
||||
xorriso->boot_image_cat_path, &bootimg);
|
||||
if(ret > 0)
|
||||
if(ret > 0) {
|
||||
iso_image_set_boot_catalog_weight(image, 1000000000);
|
||||
if(xorriso->boot_image_cat_hidden) {
|
||||
hide_attr= LIBISO_HIDE_BUT_WRITE;
|
||||
if(xorriso->boot_image_cat_hidden & 1)
|
||||
hide_attr|= LIBISO_HIDE_ON_RR;
|
||||
if(xorriso->boot_image_cat_hidden & 2)
|
||||
hide_attr|= LIBISO_HIDE_ON_JOLIET;
|
||||
iso_image_set_boot_catalog_hidden(image, hide_attr);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ret= iso_image_add_boot_image(image, bin_path, emul_type, 0, &bootimg);
|
||||
}
|
||||
@ -487,7 +496,7 @@ ex:;
|
||||
int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
||||
{
|
||||
int ret, relax= 0, i, pacifier_speed= 0, data_lba, ext, is_bootable= 0;
|
||||
int major, minor, micro;
|
||||
int major, minor, micro, freshly_bootable= 0;
|
||||
char xorriso_id[256], *img_id, sfe[5*SfileadrL], *out_cs;
|
||||
struct isoburn_imgen_opts *sopts= NULL;
|
||||
struct burn_drive_info *dinfo, *source_dinfo;
|
||||
@ -590,6 +599,7 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
||||
ret= Xorriso_attach_boot_image(xorriso, xorriso->boot_count == 0);
|
||||
if(ret <= 0)
|
||||
goto ex;
|
||||
freshly_bootable= 1;
|
||||
}
|
||||
if(xorriso->boot_count > 0) {
|
||||
/* Eventually rename boot catalog node to changed boot_image_cat_path */
|
||||
@ -629,7 +639,7 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
||||
ret= Xorriso_set_isolinux_options(xorriso, image, 0);
|
||||
if(ret <= 0)
|
||||
goto ex;
|
||||
} else {
|
||||
} else if(!freshly_bootable) {
|
||||
sprintf(xorriso->info_text,
|
||||
"Could not find any boot image for -boot_image patching");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
|
||||
|
Reference in New Issue
Block a user