Avoided -boot_image patching for images which obviously have no boot-info-table
This commit is contained in:
parent
eea8016fc2
commit
224275e454
@ -9,7 +9,7 @@
|
||||
.\" First parameter, NAME, should be all caps
|
||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||
.\" other parameters are allowed: see man(7), man(1)
|
||||
.TH XORRISO 1 "Apr 26, 2010"
|
||||
.TH XORRISO 1 "Apr 28, 2010"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
@ -2188,20 +2188,21 @@ introduced into the ISO image or if an existing image gets relocated.
|
||||
This is automatically done if type "isolinux" or "grub"
|
||||
is given, but not with "any".
|
||||
.br
|
||||
\fBshow_status\fR will print what is known about the loaded image
|
||||
and its designated fate.
|
||||
.br
|
||||
\fBnext\fR ends the definition of a boot image and starts a new one.
|
||||
Any following -bootimage bootspecs will affect the new image.
|
||||
The first "next" discards eventually loaded boot images and their
|
||||
catalog.
|
||||
.br
|
||||
CAUTION: xorriso cannot recognize the inner form of boot images.
|
||||
So the user has already to know about the particular needs of the
|
||||
boot images which are present on the input media.
|
||||
If patching is enabled, then boot images from previous sessions will
|
||||
be checked whether they seem to bear a boot info table. If not,
|
||||
then they stay unpatched. This check is not infallible. So if
|
||||
you do know that the images need no patching, use "any" "keep".
|
||||
"grub" "patch" will not patch EFI images (platform_id=0xef).
|
||||
.br
|
||||
Most safe is the default: -boot_image "any" "discard".
|
||||
.br
|
||||
Advised for GRUB : -boot_image "grub" "patch"
|
||||
.br
|
||||
For ISOLINUX : -boot_image "isolinux" "patch"
|
||||
.br
|
||||
\fBshow_status\fR will print what is known about the loaded boot images
|
||||
and their designated fate.
|
||||
.br
|
||||
|
||||
A \fBbootspec\fR is a word of the form name=value and is used to describe
|
||||
the parameters of a boot image by an El Torito record and eventually a MBR.
|
||||
@ -2264,11 +2265,17 @@ It is limited to 24 characters. Other id_strings become section IDs.
|
||||
Up to 20 bytes get read from the given characters [0-9A-Fa-f].
|
||||
They get attributed to the boot image entry in the catalog.
|
||||
.br
|
||||
\fBnext\fR ends the definition of a boot image and starts a new one.
|
||||
Any following -bootimage bootspecs will affect the new image.
|
||||
The first "next" discards eventually loaded boot images and their
|
||||
catalog.
|
||||
.br
|
||||
\fBdiscard\fR gives up an existing boot catalog and its boot images.
|
||||
.br
|
||||
\fBkeep\fR keeps or copies boot images unaltered and writes a new catalog.
|
||||
.br
|
||||
\fBpatch\fR applies boot info table patching to existing boot images.
|
||||
\fBpatch\fR applies patching to existing boot images
|
||||
if they seem to bear a boot info table.
|
||||
.br
|
||||
\fBsystem_area=\fRdisk_path copies at most 32768 bytes from the given
|
||||
disk file to the very start of the ISO image.
|
||||
@ -3178,7 +3185,7 @@ Adopted from grub-mkisofs are --protective-msdos-label
|
||||
(see -boot_image grub partition_table=on) and
|
||||
--modification-date=YYYYMMDDhhmmsscc
|
||||
(see -volume_date uuid). For EFI bootable GRUB boot images use --efi-boot.
|
||||
It performs -boot_image grub efi_boot= surrounded by two -boot_image any next.
|
||||
It performs -boot_image grub efi_path= surrounded by two -boot_image any next.
|
||||
.br
|
||||
For MBR bootable ISOLINUX images there is -isohybrid-mbr FILE, where
|
||||
FILE is one of the Syslinux files mbr/isohdp[fp]x*.bin . Use this
|
||||
|
@ -7034,7 +7034,7 @@ bin_path:;
|
||||
treatment= sfe;
|
||||
efi_path_in_use= 1;
|
||||
|
||||
} else if(xorriso->patch_isolinux_image) {
|
||||
} else if(xorriso->patch_isolinux_image & 1) {
|
||||
treatment= "patch";
|
||||
if(xorriso->patch_system_area & 1)
|
||||
form= "grub";
|
||||
@ -7048,7 +7048,7 @@ bin_path:;
|
||||
sprintf(line,"-boot_image %s %s\n", form, treatment);
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
if(xorriso->patch_isolinux_image && xorriso->boot_image_bin_path[0] &&
|
||||
if((xorriso->patch_isolinux_image & 1) && xorriso->boot_image_bin_path[0] &&
|
||||
!patch_is_implicit) {
|
||||
sprintf(line,"-boot_image any boot_info_table=on\n");
|
||||
if(!(is_default && no_defaults))
|
||||
@ -14086,20 +14086,24 @@ cannot_keep_or_patch:;
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
return(0);
|
||||
}
|
||||
if(isolinux_grub)
|
||||
goto treatment_patch;
|
||||
xorriso->keep_boot_image= 1;
|
||||
xorriso->patch_isolinux_image= !!isolinux_grub;
|
||||
xorriso->patch_isolinux_image= 0;
|
||||
xorriso->boot_image_bin_path[0]= 0;
|
||||
xorriso->patch_system_area= 0;
|
||||
|
||||
} else if(strcmp(treatpt, "patch")==0) {
|
||||
treatment_patch:;
|
||||
if(xorriso->boot_count > 0)
|
||||
goto cannot_keep_or_patch;
|
||||
xorriso->keep_boot_image= 0;
|
||||
xorriso->patch_isolinux_image= 1;
|
||||
xorriso->boot_image_bin_path[0]= 0;
|
||||
if(strcmp(formpt, "grub")==0)
|
||||
if(strcmp(formpt, "grub") == 0) {
|
||||
xorriso->patch_isolinux_image|= 2;
|
||||
xorriso->patch_system_area= 1;
|
||||
else if(strcmp(formpt, "isolinux")==0)
|
||||
} else if(strcmp(formpt, "isolinux") == 0)
|
||||
xorriso->patch_system_area= 2;
|
||||
else
|
||||
xorriso->patch_system_area= 0;
|
||||
@ -14235,7 +14239,7 @@ cannot_keep_or_patch:;
|
||||
if(strcmp(treatpt + 16, "off") == 0)
|
||||
xorriso->patch_isolinux_image= 0;
|
||||
else if(strcmp(treatpt + 16, "on") == 0)
|
||||
xorriso->patch_isolinux_image= 1;
|
||||
xorriso->patch_isolinux_image= 1 | (2 * (strcmp(treatpt, "grub") == 0));
|
||||
else
|
||||
was_ok= 0;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
This is xorriso/xorriso.info, produced by makeinfo version 4.8 from
|
||||
./xorriso/xorriso.texi.
|
||||
This is xorriso.info, produced by makeinfo version 4.8 from
|
||||
./xorriso.texi.
|
||||
|
||||
INFO-DIR-SECTION Archiving
|
||||
START-INFO-DIR-ENTRY
|
||||
@ -1959,16 +1959,16 @@ of the existing sessions, unless one can assume overwriteable media.
|
||||
newly introduced into the ISO image or if an existing image gets
|
||||
relocated. This is automatically done if type "isolinux" or "grub"
|
||||
is given, but not with "any".
|
||||
*show_status* will print what is known about the loaded image and
|
||||
its designated fate.
|
||||
*next* ends the definition of a boot image and starts a new one.
|
||||
Any following -bootimage bootspecs will affect the new image. The
|
||||
first "next" discards eventually loaded boot images and their
|
||||
catalog.
|
||||
CAUTION: xorriso cannot recognize the inner form of boot images.
|
||||
So the user has already to know about the particular needs of the
|
||||
boot images which are present on the input media.
|
||||
If patching is enabled, then boot images from previous sessions
|
||||
will be checked whether they seem to bear a boot info table. If
|
||||
not, then they stay unpatched. This check is not infallible. So if
|
||||
you do know that the images need no patching, use "any" "keep".
|
||||
"grub" "patch" will not patch EFI images (platform_id=0xef).
|
||||
Most safe is the default: -boot_image "any" "discard".
|
||||
Advised for GRUB : -boot_image "grub" "patch"
|
||||
For ISOLINUX : -boot_image "isolinux" "patch"
|
||||
*show_status* will print what is known about the loaded boot images
|
||||
and their designated fate.
|
||||
|
||||
A *bootspec* is a word of the form name=value and is used to
|
||||
describe the parameters of a boot image by an El Torito record and
|
||||
@ -2020,10 +2020,15 @@ of the existing sessions, unless one can assume overwriteable media.
|
||||
image. Up to 20 bytes get read from the given characters
|
||||
[0-9A-Fa-f]. They get attributed to the boot image entry in the
|
||||
catalog.
|
||||
*next* ends the definition of a boot image and starts a new one.
|
||||
Any following -bootimage bootspecs will affect the new image. The
|
||||
first "next" discards eventually loaded boot images and their
|
||||
catalog.
|
||||
*discard* gives up an existing boot catalog and its boot images.
|
||||
*keep* keeps or copies boot images unaltered and writes a new
|
||||
catalog.
|
||||
*patch* applies boot info table patching to existing boot images.
|
||||
*patch* applies patching to existing boot images if they seem to
|
||||
bear a boot info table.
|
||||
*system_area=*disk_path copies at most 32768 bytes from the given
|
||||
disk file to the very start of the ISO image. This System Area is
|
||||
reserved for system dependent boot software, e.g. an MBR which can
|
||||
@ -3923,7 +3928,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 104)
|
||||
* MBR, set, -boot_image system_area=: Bootable. (line 109)
|
||||
* MD5, control handling, -md5: Loading. (line 141)
|
||||
* Media, erase, -blank: Writing. (line 45)
|
||||
* Media, format, -format: Writing. (line 69)
|
||||
@ -3953,7 +3958,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
|
||||
* Ownership, global in ISO image, -uid: SetWrite. (line 125)
|
||||
* Ownership, in ISO image, -chown: Manip. (line 42)
|
||||
* Ownership, in ISO image, -chown_r: Manip. (line 47)
|
||||
* Partition table, _definiton: Bootable. (line 111)
|
||||
* Partition table, _definiton: Bootable. (line 116)
|
||||
* Pathspec, _definition: SetInsert. (line 120)
|
||||
* Pattern expansion, _definition: Processing. (line 22)
|
||||
* Pattern expansion, for disk paths, -disk_pattern: Insert. (line 31)
|
||||
@ -4004,7 +4009,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 104)
|
||||
* System area, _definiton: Bootable. (line 109)
|
||||
* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 189)
|
||||
* Table-of-content, show, -toc: Inquiry. (line 18)
|
||||
* Timestamps, set in ISO image, -alter_date: Manip. (line 146)
|
||||
@ -4045,57 +4050,57 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top436
|
||||
Node: Overview1340
|
||||
Node: Model3225
|
||||
Node: Media6105
|
||||
Node: Methods8535
|
||||
Node: Drives11082
|
||||
Node: Extras14348
|
||||
Node: Processing17746
|
||||
Node: Dialog21242
|
||||
Node: Options22899
|
||||
Node: AqDrive24467
|
||||
Node: Loading27373
|
||||
Node: Insert39808
|
||||
Node: SetInsert48165
|
||||
Node: Manip56732
|
||||
Node: CmdFind64608
|
||||
Node: Filter73953
|
||||
Node: Writing78302
|
||||
Node: SetWrite84591
|
||||
Node: Bootable94723
|
||||
Node: Charset102182
|
||||
Node: Exception104936
|
||||
Node: DialogCtl109451
|
||||
Node: Inquiry111796
|
||||
Node: Navigate115936
|
||||
Node: Verify123290
|
||||
Node: Restore131710
|
||||
Node: Emulation138366
|
||||
Node: Scripting145192
|
||||
Node: Frontend150754
|
||||
Node: Examples151955
|
||||
Node: ExDevices153124
|
||||
Node: ExCreate153606
|
||||
Node: ExDialog154880
|
||||
Node: ExGrowing156142
|
||||
Node: ExModifying156944
|
||||
Node: ExBootable157445
|
||||
Node: ExCharset157992
|
||||
Node: ExPseudo158820
|
||||
Node: ExCdrecord159714
|
||||
Node: ExMkisofs160029
|
||||
Node: ExGrowisofs161032
|
||||
Node: ExException162156
|
||||
Node: ExTime162610
|
||||
Node: ExIncBackup163069
|
||||
Node: ExRestore166541
|
||||
Node: ExRecovery167510
|
||||
Node: Files168076
|
||||
Node: Seealso169114
|
||||
Node: Legal169638
|
||||
Node: CommandIdx170560
|
||||
Node: ConceptIdx183861
|
||||
Node: Top420
|
||||
Node: Overview1324
|
||||
Node: Model3209
|
||||
Node: Media6089
|
||||
Node: Methods8519
|
||||
Node: Drives11066
|
||||
Node: Extras14332
|
||||
Node: Processing17730
|
||||
Node: Dialog21226
|
||||
Node: Options22883
|
||||
Node: AqDrive24451
|
||||
Node: Loading27357
|
||||
Node: Insert39792
|
||||
Node: SetInsert48149
|
||||
Node: Manip56716
|
||||
Node: CmdFind64592
|
||||
Node: Filter73937
|
||||
Node: Writing78286
|
||||
Node: SetWrite84575
|
||||
Node: Bootable94707
|
||||
Node: Charset102455
|
||||
Node: Exception105209
|
||||
Node: DialogCtl109724
|
||||
Node: Inquiry112069
|
||||
Node: Navigate116209
|
||||
Node: Verify123563
|
||||
Node: Restore131983
|
||||
Node: Emulation138639
|
||||
Node: Scripting145465
|
||||
Node: Frontend151027
|
||||
Node: Examples152228
|
||||
Node: ExDevices153397
|
||||
Node: ExCreate153879
|
||||
Node: ExDialog155153
|
||||
Node: ExGrowing156415
|
||||
Node: ExModifying157217
|
||||
Node: ExBootable157718
|
||||
Node: ExCharset158265
|
||||
Node: ExPseudo159093
|
||||
Node: ExCdrecord159987
|
||||
Node: ExMkisofs160302
|
||||
Node: ExGrowisofs161305
|
||||
Node: ExException162429
|
||||
Node: ExTime162883
|
||||
Node: ExIncBackup163342
|
||||
Node: ExRestore166814
|
||||
Node: ExRecovery167783
|
||||
Node: Files168349
|
||||
Node: Seealso169387
|
||||
Node: Legal169911
|
||||
Node: CommandIdx170833
|
||||
Node: ConceptIdx184134
|
||||
|
||||
End Tag Table
|
||||
|
@ -44,7 +44,7 @@
|
||||
@c man .\" First parameter, NAME, should be all caps
|
||||
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||
@c man .\" other parameters are allowed: see man(7), man(1)
|
||||
@c man .TH XORRISO 1 "Apr 26, 2010"
|
||||
@c man .TH XORRISO 1 "Apr 28, 2010"
|
||||
@c man .\" Please adjust this date whenever revising the manpage.
|
||||
@c man .\"
|
||||
@c man .\" Some roff macros, for reference:
|
||||
@ -2637,20 +2637,21 @@ introduced into the ISO image or if an existing image gets relocated.
|
||||
This is automatically done if type "isolinux" or "grub"
|
||||
is given, but not with "any".
|
||||
@*
|
||||
@strong{show_status} will print what is known about the loaded image
|
||||
and its designated fate.
|
||||
@*
|
||||
@strong{next} ends the definition of a boot image and starts a new one.
|
||||
Any following -bootimage bootspecs will affect the new image.
|
||||
The first "next" discards eventually loaded boot images and their
|
||||
catalog.
|
||||
@*
|
||||
CAUTION: xorriso cannot recognize the inner form of boot images.
|
||||
So the user has already to know about the particular needs of the
|
||||
boot images which are present on the input media.
|
||||
If patching is enabled, then boot images from previous sessions will
|
||||
be checked whether they seem to bear a boot info table. If not,
|
||||
then they stay unpatched. This check is not infallible. So if
|
||||
you do know that the images need no patching, use "any" "keep".
|
||||
"grub" "patch" will not patch EFI images (platform_id=0xef).
|
||||
@*
|
||||
Most safe is the default: -boot_image "any" "discard".
|
||||
@*
|
||||
Advised for GRUB : -boot_image "grub" "patch"
|
||||
@*
|
||||
For ISOLINUX : -boot_image "isolinux" "patch"
|
||||
@*
|
||||
@strong{show_status} will print what is known about the loaded boot images
|
||||
and their designated fate.
|
||||
@*
|
||||
@sp 1
|
||||
|
||||
A @strong{bootspec} is a word of the form name=value and is used to describe
|
||||
@ -2714,11 +2715,17 @@ It is limited to 24 characters. Other id_strings become section IDs.
|
||||
Up to 20 bytes get read from the given characters [0-9A-Fa-f].
|
||||
They get attributed to the boot image entry in the catalog.
|
||||
@*
|
||||
@strong{next} ends the definition of a boot image and starts a new one.
|
||||
Any following -bootimage bootspecs will affect the new image.
|
||||
The first "next" discards eventually loaded boot images and their
|
||||
catalog.
|
||||
@*
|
||||
@strong{discard} gives up an existing boot catalog and its boot images.
|
||||
@*
|
||||
@strong{keep} keeps or copies boot images unaltered and writes a new catalog.
|
||||
@*
|
||||
@strong{patch} applies boot info table patching to existing boot images.
|
||||
@strong{patch} applies patching to existing boot images
|
||||
if they seem to bear a boot info table.
|
||||
@*
|
||||
@cindex System area, _definiton
|
||||
@cindex MBR, set, -boot_image system_area=
|
||||
|
@ -270,7 +270,7 @@ struct XorrisO { /* the global context of xorriso */
|
||||
char boot_image_bin_path[SfileadrL];
|
||||
char boot_image_bin_form[16];
|
||||
int boot_platform_id;
|
||||
int patch_isolinux_image;
|
||||
int patch_isolinux_image; /* bit0= boot-info-table , bit1= not with EFI */
|
||||
int boot_image_emul; /* 0=no emulation
|
||||
(1=emulation as hard disk)
|
||||
(2=emulation as floppy)
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2010.04.27.074834"
|
||||
#define Xorriso_timestamP "2010.04.29.133234"
|
||||
|
@ -1309,7 +1309,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
|
||||
if(has_what & isoburn_ropt_has_el_torito) {
|
||||
if(xorriso->boot_image_bin_path[0])
|
||||
boot_fate= "replaced by new boot image";
|
||||
else if(xorriso->patch_isolinux_image)
|
||||
else if(xorriso->patch_isolinux_image & 1)
|
||||
boot_fate= "patched at boot info table";
|
||||
else if(xorriso->keep_boot_image)
|
||||
boot_fate= "kept unchanged";
|
||||
@ -1608,10 +1608,12 @@ int Xorriso_is_isohybrid(struct XorrisO *xorriso, IsoFile *bootimg_node,
|
||||
}
|
||||
|
||||
|
||||
/* @param flag bit0= operating on newly attached boot image
|
||||
*/
|
||||
int Xorriso_set_isolinux_options(struct XorrisO *xorriso,
|
||||
IsoImage *image, int flag)
|
||||
{
|
||||
int make_isohybrid_mbr= 0, ret, patch_table= 0, num_boots;
|
||||
int make_isohybrid_mbr= 0, ret, patch_table= 0, num_boots, i;
|
||||
ElToritoBootImage *bootimg, **boots = NULL;
|
||||
IsoFile *bootimg_node, **bootnodes = NULL;
|
||||
|
||||
@ -1629,36 +1631,55 @@ int Xorriso_set_isolinux_options(struct XorrisO *xorriso,
|
||||
"FATAL", 1);
|
||||
ret= -1; goto ex;
|
||||
}
|
||||
patch_table = !!xorriso->patch_isolinux_image;
|
||||
if(xorriso->boot_image_isohybrid == 0 || num_boots > 1) {
|
||||
patch_table= xorriso->patch_isolinux_image & 1;
|
||||
if((flag & 1) && num_boots > 1) {
|
||||
ret= el_torito_set_isolinux_options(boots[num_boots - 1], patch_table, 0);
|
||||
ret= (ret == 1); goto ex;
|
||||
}
|
||||
if(xorriso->boot_image_isohybrid == 3) {
|
||||
make_isohybrid_mbr= 1;
|
||||
} else {
|
||||
ret= Xorriso_is_isohybrid(xorriso, bootimg_node, 0);
|
||||
if(ret < 0)
|
||||
{ret= 0; goto ex;}
|
||||
if(ret > 0)
|
||||
|
||||
/* Handle patching of first attached boot image or of imported boot images
|
||||
*/
|
||||
for(i= 0; i < num_boots; i++) {
|
||||
patch_table = xorriso->patch_isolinux_image & 1;
|
||||
if(patch_table && !(flag & 1)) {
|
||||
if(!el_torito_seems_boot_info_table(boots[i], 0))
|
||||
patch_table= 0;
|
||||
else if((xorriso->patch_isolinux_image & 2) &&
|
||||
el_torito_get_boot_platform_id(boots[i]) == 0xef)
|
||||
patch_table= 0;
|
||||
}
|
||||
if(i > 0 || xorriso->boot_image_isohybrid == 0) {
|
||||
ret= el_torito_set_isolinux_options(boots[i], patch_table, 0);
|
||||
if(ret != 1)
|
||||
{ret= 0; goto ex;}
|
||||
continue;
|
||||
}
|
||||
if(xorriso->boot_image_isohybrid == 3) {
|
||||
make_isohybrid_mbr= 1;
|
||||
}
|
||||
} else {
|
||||
ret= Xorriso_is_isohybrid(xorriso, bootimg_node, 0);
|
||||
if(ret < 0)
|
||||
{ret= 0; goto ex;}
|
||||
if(ret > 0)
|
||||
make_isohybrid_mbr= 1;
|
||||
}
|
||||
|
||||
if(xorriso->boot_image_isohybrid == 2 && !make_isohybrid_mbr) {
|
||||
sprintf(xorriso->info_text,
|
||||
if(xorriso->boot_image_isohybrid == 2 && !make_isohybrid_mbr) {
|
||||
sprintf(xorriso->info_text,
|
||||
"Isohybrid signature is demanded but not found in boot image file.");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
{ret= 0; goto ex;}
|
||||
}
|
||||
if(make_isohybrid_mbr) {
|
||||
sprintf(xorriso->info_text, "Will write isohybrid MBR.");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
||||
xorriso->alignment= 512;
|
||||
}
|
||||
|
||||
ret= el_torito_set_isolinux_options(bootimg,
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
{ret= 0; goto ex;}
|
||||
}
|
||||
if(make_isohybrid_mbr) {
|
||||
sprintf(xorriso->info_text, "Will write isohybrid MBR.");
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
|
||||
xorriso->alignment= 512;
|
||||
}
|
||||
ret= el_torito_set_isolinux_options(bootimg,
|
||||
patch_table | (make_isohybrid_mbr << 1),0);
|
||||
ret= (ret == 1);
|
||||
if(ret != 1)
|
||||
{ret= 0; goto ex;}
|
||||
}
|
||||
ex:
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
if(boots != NULL)
|
||||
@ -1901,9 +1922,9 @@ int Xorriso_boot_item_status(struct XorrisO *xorriso, char *cat_path,
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
|
||||
is_default= (patch_isolinux == 0 || bin_path[0] == 0 || (flag & 4));
|
||||
is_default= ((patch_isolinux & 1) == 0 || bin_path[0] == 0 || (flag & 4));
|
||||
sprintf(line, "-boot_image %s boot_info_table=%s\n",
|
||||
form, patch_isolinux ? "on" : "off");
|
||||
(patch_isolinux & 2) ? "grub" : form, patch_isolinux ? "on" : "off");
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
|
||||
@ -1964,8 +1985,9 @@ int Xorriso_boot_image_status(struct XorrisO *xorriso, char *filter, FILE *fp,
|
||||
no_defaults= flag & 1;
|
||||
|
||||
if(xorriso->boot_count == 0 && xorriso->boot_image_bin_path[0] == 0) {
|
||||
if(xorriso->patch_isolinux_image) {
|
||||
sprintf(line, "-boot_image %s patch\n", form);
|
||||
if(xorriso->patch_isolinux_image & 1) {
|
||||
sprintf(line, "-boot_image %s patch\n",
|
||||
xorriso->patch_isolinux_image & 2 ? "grub" : form);
|
||||
is_default= 0;
|
||||
} else if(xorriso->keep_boot_image) {
|
||||
sprintf(line, "-boot_image %s keep\n", form);
|
||||
@ -2211,12 +2233,12 @@ int Xorriso_attach_boot_image(struct XorrisO *xorriso, int flag)
|
||||
el_torito_set_load_size(bootimg, load_size / 512);
|
||||
el_torito_set_id_string(bootimg, xorriso->boot_id_string);
|
||||
el_torito_set_selection_crit(bootimg, xorriso->boot_selection_crit);
|
||||
ret= Xorriso_set_isolinux_options(xorriso, image, 0);
|
||||
ret= Xorriso_set_isolinux_options(xorriso, image, 1);
|
||||
if(!(flag & 1)) {
|
||||
/* Register attachment and reset even in case of error return */
|
||||
xorriso->boot_count++;
|
||||
xorriso->boot_platform_id= 0;
|
||||
xorriso->patch_isolinux_image&= ~1;
|
||||
xorriso->patch_isolinux_image= 0;
|
||||
xorriso->boot_image_bin_path[0]= 0;
|
||||
xorriso->boot_image_bin_form[0]= 0;
|
||||
xorriso->boot_image_emul= 0;
|
||||
@ -2560,7 +2582,7 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
||||
|
||||
#endif /* ! Xorriso_multi_booT */
|
||||
|
||||
} else if(xorriso->patch_isolinux_image) {
|
||||
} else if(xorriso->patch_isolinux_image & 1) {
|
||||
if(is_bootable == 1) {
|
||||
relax|= isoburn_igopt_allow_full_ascii;
|
||||
sprintf(xorriso->info_text, "Patching boot info table");
|
||||
@ -5876,6 +5898,21 @@ int Xorriso_toc_line(struct XorrisO *xorriso, int flag)
|
||||
}
|
||||
|
||||
|
||||
int Xorriso__append_boot_params(char *line, ElToritoBootImage *bootimg,
|
||||
int flag)
|
||||
{
|
||||
unsigned int platform_id;
|
||||
|
||||
platform_id= el_torito_get_boot_platform_id(bootimg);
|
||||
if(platform_id != 0)
|
||||
sprintf(line + strlen(line),
|
||||
" , platform_id=0x%-2.2X ", (unsigned int) platform_id);
|
||||
if(el_torito_seems_boot_info_table(bootimg, 0))
|
||||
sprintf(line + strlen(line), " , boot_info_table=on");
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
/* @param flag bit0= no output if no boot record was found
|
||||
bit1= short form
|
||||
bit3= report to info channel (else to result channel)
|
||||
@ -5883,9 +5920,9 @@ int Xorriso_toc_line(struct XorrisO *xorriso, int flag)
|
||||
int Xorriso_show_boot_info(struct XorrisO *xorriso, int flag)
|
||||
{
|
||||
int ret, bin_path_valid= 0,has_isolinux_mbr= 0, i, num_boots;
|
||||
unsigned int mbr_lba= 0, platform_id;
|
||||
unsigned int mbr_lba= 0;
|
||||
off_t lb0_count;
|
||||
char *respt, sfe[5*SfileadrL], path[SfileadrL], path_cmd[16];
|
||||
char *respt, sfe[5*SfileadrL], path[SfileadrL];
|
||||
unsigned char lb0[2048];
|
||||
struct burn_drive_info *dinfo;
|
||||
struct burn_drive *drive;
|
||||
@ -5969,36 +6006,34 @@ no_boot:;
|
||||
{ret= 1; goto ex;}
|
||||
|
||||
if(xorriso->loaded_boot_cat_path[0])
|
||||
sprintf(respt, "Boot cat_path: %s\n",
|
||||
sprintf(respt, "Boot catalog : %s\n",
|
||||
Text_shellsafe(xorriso->loaded_boot_cat_path, sfe, 0));
|
||||
else
|
||||
sprintf(respt, "Boot cat_path: -not-found-at-load-time-\n");
|
||||
sprintf(respt, "Boot catalog : -not-found-at-load-time-\n");
|
||||
Xorriso_toc_line(xorriso, flag & 8);
|
||||
|
||||
platform_id= el_torito_get_boot_platform_id(bootimg);
|
||||
strcpy(path_cmd, "bin_path");
|
||||
if(platform_id != 0)
|
||||
sprintf(path_cmd, " 0x%-2.2X ", (unsigned int) platform_id);
|
||||
if(bin_path_valid)
|
||||
sprintf(respt, "Boot %s: %s\n", path_cmd, Text_shellsafe(path, sfe, 0));
|
||||
sprintf(respt, "Boot image : %s", Text_shellsafe(path, sfe, 0));
|
||||
else if(xorriso->loaded_boot_bin_lba <= 0)
|
||||
sprintf(respt, "Boot %s: -not-found-at-load-time-\n", path_cmd);
|
||||
sprintf(respt, "Boot image : -not-found-at-load-time-");
|
||||
else
|
||||
sprintf(respt, "Boot %s: -not-found-any-more-by-lba=%d\n", path_cmd,
|
||||
sprintf(respt, "Boot image : -not-found-any-more-by-lba=%d",
|
||||
xorriso->loaded_boot_bin_lba);
|
||||
Xorriso__append_boot_params(respt, bootimg, 0);
|
||||
strcat(respt, "\n");
|
||||
Xorriso_toc_line(xorriso, flag & 8);
|
||||
|
||||
ret= iso_image_get_all_boot_imgs(image, &num_boots, &boots, &bootnodes, 0);
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
if(ret == 1 && num_boots > 1) {
|
||||
for(i= 1; i < num_boots; i++) {
|
||||
platform_id= el_torito_get_boot_platform_id(boots[i]);
|
||||
sprintf(path_cmd, "platf %-2.2X", (unsigned int) platform_id);
|
||||
ret= Xorriso_path_from_node(xorriso, (IsoNode *) bootnodes[i], path, 0);
|
||||
if(ret > 0)
|
||||
sprintf(respt, "Boot %s: %s\n", path_cmd, Text_shellsafe(path, sfe, 0));
|
||||
sprintf(respt, "Boot image : %s", Text_shellsafe(path, sfe, 0));
|
||||
else
|
||||
sprintf(respt, "Boot %s: -not-found-any-more-\n", path_cmd);
|
||||
sprintf(respt, "Boot image : -not-found-any-more-");
|
||||
Xorriso__append_boot_params(respt, boots[i], 0);
|
||||
strcat(respt, "\n");
|
||||
Xorriso_toc_line(xorriso, flag & 8);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user