Polishing of new GRUB supporting features

This commit is contained in:
Thomas Schmitt 2010-04-06 19:24:39 +00:00
parent e2af1e3deb
commit 24a9a199c2
3 changed files with 43 additions and 11 deletions

View File

@ -10513,6 +10513,38 @@ int Xorriso_reaquire_outdev(struct XorrisO *xorriso, int flag)
}
int Xorriso_set_system_area_path(struct XorrisO *xorriso, char *path, int flag)
{
int ret;
char eff_src[SfileadrL];
if(path[0] == 0) {
xorriso->system_area_disk_path[0]= 0;
return(1);
}
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdx, path, eff_src, 2|4|16);
if(ret < 0)
return(ret);
if(ret == 0) {
sprintf(xorriso->info_text,
"Given path does not exist on disk: -boot_image system_area=");
Text_shellsafe(eff_src, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
}
if(ret == 2) {
sprintf(xorriso->info_text,
"Given path leads to a directory: -boot_image system_area=");
Text_shellsafe(eff_src, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
ret= Sfile_str(xorriso->system_area_disk_path, eff_src, 0);
if(ret <= 0)
return(-1);
return(1);
}
int Xorriso_cdrskin_help(struct XorrisO *xorriso, int flag)
{
static char helptext[][80]= {
@ -11211,17 +11243,16 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
ret= Xorriso_option_boot_image(xorriso, "isolinux", sfe, 0);
if(ret <= 0)
goto problem_handler_1;
} else if(strcmp(argv[i], "--embedded-boot")==0) {
} else if(strcmp(argv[i], "--embedded-boot")==0 ||
strcmp(argv[i], "-G") == 0) {
if(i+1>=argc)
goto not_enough_args;
i++;
ret= Sfile_str(xorriso->system_area_disk_path, argv[i], 0);
ret= Xorriso_set_system_area_path(xorriso, argv[i], 0);
if(ret <= 0)
{ret= -1; goto ex;}
goto ex;
} else if(strcmp(argv[i], "--protective-msdos-label")==0) {
xorriso->system_area_options|= 1;
} else if(strcmp(argv[i], "-input-charset")==0) {
if(i+1>=argc)
goto not_enough_args;
@ -11486,7 +11517,8 @@ not_enough_args:;
/* was already handled in first argument scan */;
} else if(strncmp(argv[i], "isolinux_mbr=", 13)==0) {
/* was already handled in first argument scan */;
} else if(strcmp(argv[i], "--embedded-boot")==0) {
} else if(strcmp(argv[i], "--embedded-boot")==0 ||
strcmp(argv[i], "-G") == 0) {
i++;
/* was already handled in first argument scan */;
} else if(strcmp(argv[i], "--protective-msdos-label")==0) {
@ -13725,9 +13757,9 @@ int Xorriso_option_boot_image(struct XorrisO *xorriso, char *form,
xorriso->boot_image_load_size= num;
} else if(strncmp(treatpt, "system_area=", 12) == 0) {
ret= Sfile_str(xorriso->system_area_disk_path, treatpt + 12, 0);
ret= Xorriso_set_system_area_path(xorriso, treatpt + 12, 0);
if(ret <= 0)
return(-1);
return(ret);
} else if(strncmp(treatpt, "partition_table=", 16)==0) {
if(strcmp(treatpt + 16, "off") == 0)

View File

@ -123,7 +123,7 @@ Writes result as completely new image or as add-on session
to optical media or filesystem objects.
</LI>
<LI>
Can activate ISOLINUX boot images by El Torito boot record.
Can activate ISOLINUX and GRUB boot images by El Torito boot record.
</LI>
<LI>
Can perform multi-session tasks as emulation of mkisofs and cdrecord.
@ -487,7 +487,7 @@ Bug fixes towards xorriso-0.5.0:
<!--
<P>
Bug fixes towards xorriso-0.4.8.pl00:
Bug fixes towards xorriso-0.5.0:
<UL>
<LI>
</LI>

View File

@ -1 +1 @@
#define Xorriso_timestamP "2010.04.06.151750"
#define Xorriso_timestamP "2010.04.06.192328"