Bug fixes and improvements of previous revision 3197
This commit is contained in:
parent
83e41ceabd
commit
7aae77f2ac
@ -6747,7 +6747,7 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
|
||||
{
|
||||
int is_default, no_defaults, i, ret, adr_mode, bin_path_in_use= 0, do_single;
|
||||
int show_indev= 1, show_outdev= 1, show_dev= 0, patch_is_implicit= 0;
|
||||
int part_table_implicit= 0;
|
||||
int part_table_implicit= 0, efi_path_in_use= 0;
|
||||
char *line, sfe[5 * SfileadrL + 80], mode[80], *form, *treatment, *bin_form;
|
||||
char *in_pt, *out_pt, *nl_charset, *local_charset, *mode_pt;
|
||||
char *dev_filter= NULL;
|
||||
@ -6970,6 +6970,12 @@ bin_path:;
|
||||
treatment= sfe;
|
||||
bin_path_in_use= 1;
|
||||
}
|
||||
} else if(xorriso->boot_image_efi_path[0]) {
|
||||
form= "grub";
|
||||
strcpy(sfe, "efi_path=");
|
||||
Text_shellsafe(xorriso->boot_image_efi_path, sfe + strlen(sfe), 0);
|
||||
treatment= sfe;
|
||||
efi_path_in_use= 1;
|
||||
} else if(xorriso->patch_isolinux_image) {
|
||||
treatment= "patch";
|
||||
if(xorriso->patch_system_area & 1)
|
||||
@ -6990,13 +6996,6 @@ bin_path:;
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
}
|
||||
if(xorriso->boot_image_cat_path[0] && bin_path_in_use) {
|
||||
is_default= 0;
|
||||
sprintf(line,"-boot_image %s cat_path=%s\n",
|
||||
bin_form, Text_shellsafe(xorriso->boot_image_cat_path, sfe, 0));
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
}
|
||||
if(bin_path_in_use) {
|
||||
is_default= xorriso->boot_image_load_size == 4 * 512;
|
||||
sprintf(line,"-boot_image %s load_size=%.f\n",
|
||||
@ -7004,6 +7003,27 @@ bin_path:;
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
}
|
||||
if(bin_path_in_use) {
|
||||
is_default= (xorriso->boot_platform_id == 0x00);
|
||||
sprintf(line,"-boot_image any platform_id=0x%-2.2x\n",
|
||||
(unsigned int) xorriso->boot_platform_id);
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
}
|
||||
if(xorriso->boot_image_efi_path[0] && xorriso->boot_image_bin_path[0]) {
|
||||
strcpy(line,"-boot_image grub efi_path=");
|
||||
Text_shellsafe(xorriso->boot_image_efi_path, line + strlen(line), 0);
|
||||
strcat(line, "\n");
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
efi_path_in_use= 1;
|
||||
}
|
||||
if(xorriso->boot_image_cat_path[0] && (bin_path_in_use || efi_path_in_use)) {
|
||||
is_default= 0;
|
||||
sprintf(line,"-boot_image %s cat_path=%s\n",
|
||||
bin_form, Text_shellsafe(xorriso->boot_image_cat_path, sfe, 0));
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
}
|
||||
is_default= (xorriso->system_area_disk_path[0] == 0);
|
||||
sprintf(line,"-boot_image %s system_area=%s\n",
|
||||
xorriso->system_area_disk_path[0] && (xorriso->system_area_options & 2)
|
||||
@ -7019,11 +7039,6 @@ bin_path:;
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
}
|
||||
is_default= (xorriso->boot_platform_id == 0x00);
|
||||
sprintf(line,"-boot_image any platform_id=0x%-2.2x\n",
|
||||
(unsigned int) xorriso->boot_platform_id);
|
||||
if(!(is_default && no_defaults))
|
||||
Xorriso_status_result(xorriso,filter,fp,flag&2);
|
||||
|
||||
#ifdef Xorriso_with_isohybriD
|
||||
if(strcmp(form, "isolinux") == 0) {
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2010.04.22.143944"
|
||||
#define Xorriso_timestamP "2010.04.22.160615"
|
||||
|
@ -1925,11 +1925,11 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
|
||||
if(xorriso->boot_image_bin_path[0] == 0) {
|
||||
/* Let EFI boot image be the default image */
|
||||
boot_image_bin_path= xorriso->boot_image_efi_path;
|
||||
boot_image_emul= ELTORITO_NO_EMUL;
|
||||
boot_image_emul= 0;
|
||||
boot_platform_id= 0xef;
|
||||
ret= Xorriso_iso_lstat(xorriso, xorriso->boot_image_efi_path,
|
||||
&stbuf, 2 | 4);
|
||||
if(ret <= 0)
|
||||
if(ret != 0)
|
||||
goto ex;
|
||||
boot_image_load_size= ((stbuf.st_size / (off_t) 512) +
|
||||
!!(stbuf.st_size % (off_t) 512)) * 512;
|
||||
@ -5356,10 +5356,10 @@ 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;
|
||||
int ret, bin_path_valid= 0,has_isolinux_mbr= 0, i, num_boots, bin_is_efi= 0;
|
||||
unsigned int mbr_lba= 0;
|
||||
off_t lb0_count;
|
||||
char *respt, sfe[5*SfileadrL], path[SfileadrL];
|
||||
char *respt, sfe[5*SfileadrL], path[SfileadrL], *path_cmd= "bin_path";
|
||||
unsigned char lb0[2048];
|
||||
struct burn_drive_info *dinfo;
|
||||
struct burn_drive *drive;
|
||||
@ -5388,6 +5388,7 @@ no_boot:;
|
||||
ret= iso_image_get_boot_image(image, &bootimg, &bootimg_node, &bootcat_node);
|
||||
if(ret != 1)
|
||||
goto no_boot;
|
||||
bin_is_efi= (el_torito_get_boot_platform_id(bootimg) == 0xef);
|
||||
ret= Xorriso_path_from_lba(xorriso, NULL, xorriso->loaded_boot_bin_lba,
|
||||
path, 1);
|
||||
if(ret > 0)
|
||||
@ -5431,12 +5432,14 @@ no_boot:;
|
||||
Xorriso_toc_line(xorriso, flag & 8);
|
||||
if(flag & 2)
|
||||
{ret= 1; goto ex;}
|
||||
if(bin_is_efi)
|
||||
path_cmd= "efi_path";
|
||||
if(bin_path_valid)
|
||||
sprintf(respt, "Boot bin_path: %s\n", Text_shellsafe(path, sfe, 0));
|
||||
sprintf(respt, "Boot %s: %s\n", path_cmd, Text_shellsafe(path, sfe, 0));
|
||||
else if(xorriso->loaded_boot_bin_lba <= 0)
|
||||
sprintf(respt, "Boot bin_path: -not-found-at-load-time-\n");
|
||||
sprintf(respt, "Boot %s: -not-found-at-load-time-\n", path_cmd);
|
||||
else
|
||||
sprintf(respt, "Boot bin_path: -not-found-any-more-by-lba=%d\n",
|
||||
sprintf(respt, "Boot %s: -not-found-any-more-by-lba=%d\n", path_cmd,
|
||||
xorriso->loaded_boot_bin_lba);
|
||||
Xorriso_toc_line(xorriso, flag & 8);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user