New -boot_image bootspec cat_hidden=
This commit is contained in:
parent
72ca79a46e
commit
9a46cddaac
@ -181,6 +181,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
|
||||
m->stdio_sync= 0;
|
||||
m->keep_boot_image= 0;
|
||||
m->boot_image_cat_path[0]= 0;
|
||||
m->boot_image_cat_hidden= 0;
|
||||
m->boot_count= 0;
|
||||
m->boot_platform_id= 0x00; /* El Torito Boot Catalog Platform ID: 0 = 80x86 */
|
||||
m->patch_isolinux_image= 0;
|
||||
|
@ -458,7 +458,7 @@ int Xorriso_boot_image_status(struct XorrisO *xorriso, char *filter, FILE *fp,
|
||||
{
|
||||
int ret, i, num_boots, hflag;
|
||||
int bin_path_in_use= 0, is_default, no_defaults;
|
||||
char sfe[5*SfileadrL], path[SfileadrL], *form= "any", *line;
|
||||
char sfe[5*SfileadrL], path[SfileadrL], *form= "any", *line, *hpt;
|
||||
struct burn_drive_info *dinfo;
|
||||
struct burn_drive *drive;
|
||||
IsoImage *image= NULL;
|
||||
@ -506,6 +506,19 @@ int Xorriso_boot_image_status(struct XorrisO *xorriso, char *filter, FILE *fp,
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
}
|
||||
if(bin_path_in_use) {
|
||||
is_default= !xorriso->boot_image_cat_hidden;
|
||||
hpt= "on";
|
||||
if(xorriso->boot_image_cat_hidden == 0)
|
||||
hpt= "off";
|
||||
else if(xorriso->boot_image_cat_hidden == 1)
|
||||
hpt= "iso_rr";
|
||||
else if(xorriso->boot_image_cat_hidden == 2)
|
||||
hpt= "joliet";
|
||||
sprintf(line, "-boot_image %s cat_hidden=%s\n", form, hpt);
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
}
|
||||
|
||||
if(xorriso->boot_count > 0) {
|
||||
|
||||
|
@ -624,6 +624,18 @@ treatment_patch:;
|
||||
if(ret <= 0)
|
||||
return(ret);
|
||||
|
||||
} else if(strncmp(treatpt, "cat_hidden=", 11) == 0) {
|
||||
if(strcmp(treatpt + 11, "on") == 0)
|
||||
xorriso->boot_image_cat_hidden= 1 | 2;
|
||||
else if(strcmp(treatpt + 11, "iso_rr") == 0)
|
||||
xorriso->boot_image_cat_hidden= 1;
|
||||
else if(strcmp(treatpt + 11, "joliet") == 0)
|
||||
xorriso->boot_image_cat_hidden= 2;
|
||||
else if(strcmp(treatpt + 11, "off") == 0)
|
||||
xorriso->boot_image_cat_hidden= 0;
|
||||
else
|
||||
was_ok= 0;
|
||||
|
||||
} else if(strncmp(treatpt, "dir=", 4) == 0) {
|
||||
if(strcmp(formpt, "isolinux")==0) {
|
||||
/* ISOLINUX */
|
||||
|
@ -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);
|
||||
|
@ -2246,7 +2246,9 @@ An El Torito boot catalog file gets inserted into the ISO image with address
|
||||
It is subject to normal -overwrite and -reassure processing if there is already
|
||||
a file with the same name.
|
||||
The catalog lists the boot images and is read by the boot facility to choose
|
||||
one of the boot images.
|
||||
one of the boot images. But it is not necessary that it appears in the
|
||||
directory tree at all. One may hide it in all trees by \fBcat_hidden=on\fR.
|
||||
Other possible values are "iso_rr", "joliet", and the default "off".
|
||||
.br
|
||||
\fBload_size=\fR is a value which depends on the boot image.
|
||||
Default 2048 should be overridden only if a better value is known.
|
||||
|
@ -2001,7 +2001,10 @@ of the existing sessions, unless one can assume overwriteable media.
|
||||
with address *cat_path=* at -commit time. It is subject to normal
|
||||
-overwrite and -reassure processing if there is already a file
|
||||
with the same name. The catalog lists the boot images and is read
|
||||
by the boot facility to choose one of the boot images.
|
||||
by the boot facility to choose one of the boot images. But it is
|
||||
not necessary that it appears in the directory tree at all. One
|
||||
may hide it in all trees by *cat_hidden=on*. Other possible
|
||||
values are "iso_rr", "joliet", and the default "off".
|
||||
*load_size=* is a value which depends on the boot image. Default
|
||||
2048 should be overridden only if a better value is known.
|
||||
*boot_info_table=on* may be used to apply patching to a boot image
|
||||
@ -3930,7 +3933,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
|
||||
* iso_rr_path, _definition: Insert. (line 7)
|
||||
* List delimiter, _definiton: Processing. (line 8)
|
||||
* MBR, _definiton: Extras. (line 26)
|
||||
* MBR, set, -boot_image system_area=: Bootable. (line 109)
|
||||
* MBR, set, -boot_image system_area=: Bootable. (line 112)
|
||||
* MD5, control handling, -md5: Loading. (line 136)
|
||||
* Media, erase, -blank: Writing. (line 45)
|
||||
* Media, format, -format: Writing. (line 69)
|
||||
@ -3960,7 +3963,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
|
||||
* Ownership, global in ISO image, -uid: SetWrite. (line 128)
|
||||
* Ownership, in ISO image, -chown: Manip. (line 42)
|
||||
* Ownership, in ISO image, -chown_r: Manip. (line 47)
|
||||
* Partition table, _definiton: Bootable. (line 116)
|
||||
* Partition table, _definiton: Bootable. (line 119)
|
||||
* Pathspec, _definition: SetInsert. (line 120)
|
||||
* Pattern expansion, _definition: Processing. (line 22)
|
||||
* Pattern expansion, for disk paths, -disk_pattern: Insert. (line 31)
|
||||
@ -4011,7 +4014,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
|
||||
* Session, mount command line, -mount_cmd: Inquiry. (line 31)
|
||||
* Session, mount parameters, -mount_opts: Inquiry. (line 47)
|
||||
* Session, select as input, -load: Loading. (line 11)
|
||||
* System area, _definiton: Bootable. (line 109)
|
||||
* System area, _definiton: Bootable. (line 112)
|
||||
* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 184)
|
||||
* Table-of-content, show, -toc: Inquiry. (line 18)
|
||||
* Timestamps, set in ISO image, -alter_date: Manip. (line 146)
|
||||
@ -4072,37 +4075,37 @@ Node: Filter73721
|
||||
Node: Writing78070
|
||||
Node: SetWrite84359
|
||||
Node: Bootable94643
|
||||
Node: Charset102391
|
||||
Node: Exception105145
|
||||
Node: DialogCtl109660
|
||||
Node: Inquiry112005
|
||||
Node: Navigate116145
|
||||
Node: Verify123499
|
||||
Node: Restore131919
|
||||
Node: Emulation138575
|
||||
Node: Scripting145448
|
||||
Node: Frontend151010
|
||||
Node: Examples152211
|
||||
Node: ExDevices153380
|
||||
Node: ExCreate154014
|
||||
Node: ExDialog155288
|
||||
Node: ExGrowing156550
|
||||
Node: ExModifying157352
|
||||
Node: ExBootable157853
|
||||
Node: ExCharset158400
|
||||
Node: ExPseudo159228
|
||||
Node: ExCdrecord160122
|
||||
Node: ExMkisofs160437
|
||||
Node: ExGrowisofs161440
|
||||
Node: ExException162564
|
||||
Node: ExTime163018
|
||||
Node: ExIncBackup163477
|
||||
Node: ExRestore166949
|
||||
Node: ExRecovery167918
|
||||
Node: Files168484
|
||||
Node: Seealso169522
|
||||
Node: Legal170046
|
||||
Node: CommandIdx170968
|
||||
Node: ConceptIdx184269
|
||||
Node: Charset102595
|
||||
Node: Exception105349
|
||||
Node: DialogCtl109864
|
||||
Node: Inquiry112209
|
||||
Node: Navigate116349
|
||||
Node: Verify123703
|
||||
Node: Restore132123
|
||||
Node: Emulation138779
|
||||
Node: Scripting145652
|
||||
Node: Frontend151214
|
||||
Node: Examples152415
|
||||
Node: ExDevices153584
|
||||
Node: ExCreate154218
|
||||
Node: ExDialog155492
|
||||
Node: ExGrowing156754
|
||||
Node: ExModifying157556
|
||||
Node: ExBootable158057
|
||||
Node: ExCharset158604
|
||||
Node: ExPseudo159432
|
||||
Node: ExCdrecord160326
|
||||
Node: ExMkisofs160641
|
||||
Node: ExGrowisofs161644
|
||||
Node: ExException162768
|
||||
Node: ExTime163222
|
||||
Node: ExIncBackup163681
|
||||
Node: ExRestore167153
|
||||
Node: ExRecovery168122
|
||||
Node: Files168688
|
||||
Node: Seealso169726
|
||||
Node: Legal170250
|
||||
Node: CommandIdx171172
|
||||
Node: ConceptIdx184473
|
||||
|
||||
End Tag Table
|
||||
|
@ -2701,7 +2701,9 @@ An El Torito boot catalog file gets inserted into the ISO image with address
|
||||
It is subject to normal -overwrite and -reassure processing if there is already
|
||||
a file with the same name.
|
||||
The catalog lists the boot images and is read by the boot facility to choose
|
||||
one of the boot images.
|
||||
one of the boot images. But it is not necessary that it appears in the
|
||||
directory tree at all. One may hide it in all trees by @strong{cat_hidden=on}.
|
||||
Other possible values are "iso_rr", "joliet", and the default "off".
|
||||
@*
|
||||
@strong{load_size=} is a value which depends on the boot image.
|
||||
Default 2048 should be overridden only if a better value is known.
|
||||
|
@ -262,6 +262,7 @@ struct XorrisO { /* the global context of xorriso */
|
||||
|
||||
int keep_boot_image;
|
||||
char boot_image_cat_path[SfileadrL];
|
||||
int boot_image_cat_hidden; /* bit0= hidden in ISO/RR , bit1= in Joliet */
|
||||
int boot_count; /* number of already attached boot images */
|
||||
|
||||
char boot_image_bin_path[SfileadrL];
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2010.06.18.113147"
|
||||
#define Xorriso_timestamP "2010.06.19.152046"
|
||||
|
Loading…
Reference in New Issue
Block a user