"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xorriso/emulators.c" between
xorriso-1.4.6.tar.gz and xorriso-1.4.8.tar.gz

About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.

emulators.c  (xorriso-1.4.6):emulators.c  (xorriso-1.4.8)
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2016 Thomas Schmitt, <scdbackup@gmx.net> Copyright 2007-2017 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later. Provided under GPL version 2 or later.
This file contains the implementation of emulators for mkisofs and cdrecord. This file contains the implementation of emulators for mkisofs and cdrecord.
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "../config.h" #include "../config.h"
#endif #endif
skipping to change at line 429 skipping to change at line 429
ret= 0; goto ex; ret= 0; goto ex;
} }
if(Sfile_str(track_source, argv[i], 0)<=0) if(Sfile_str(track_source, argv[i], 0)<=0)
{ret= -1; goto ex;} {ret= -1; goto ex;}
} }
} }
/* Perform actions */ /* Perform actions */
Xorriso_option_report_about(xorriso, "NOTE", 0); Xorriso_option_report_about(xorriso, "NOTE", 0);
if(do_version) { if(do_version) {
sprintf(xorriso->result_line, "Cdrecord 2.01-Emulation Copyright (C) 2013 see libburnia-project.org xorriso\n"); sprintf(xorriso->result_line, "Cdrecord 2.01-Emulation Copyright (C) 2017 see libburnia-project.org xorriso\n");
Xorriso_result(xorriso, 1); Xorriso_result(xorriso, 1);
Xorriso_option_version(xorriso, 0); Xorriso_option_version(xorriso, 0);
} }
if(do_help) { if(do_help) {
Xorriso_cdrskin_help(xorriso, 0); Xorriso_cdrskin_help(xorriso, 0);
} }
if(strcmp(blank_mode, "help")==0) { if(strcmp(blank_mode, "help")==0) {
for(i= 0; strcmp(blank_help[i], "@End_of_helptexT@")!=0; i++) { for(i= 0; strcmp(blank_help[i], "@End_of_helptexT@")!=0; i++) {
sprintf(xorriso->info_text, "%s\n", blank_help[i]); sprintf(xorriso->info_text, "%s\n", blank_help[i]);
skipping to change at line 662 skipping to change at line 662
"-jigdo-force-md5", "-jigdo-exclude", "-jigdo-map", "-md5-list", "-jigdo-force-md5", "-jigdo-exclude", "-jigdo-map", "-md5-list",
"-jigdo-template-compress", "-jigdo-template-compress",
"-checksum_algorithm_iso", "-checksum_algorithm_template", "-checksum_algorithm_iso", "-checksum_algorithm_template",
"--stdio_sync", "--quoted_path_list", "--efi-boot", "--embedded-boot", "--stdio_sync", "--quoted_path_list", "--efi-boot", "--embedded-boot",
"-isohybrid-mbr", "-e", "-partition_offset", "-partition_hd_cyl", "-isohybrid-mbr", "-e", "-partition_offset", "-partition_hd_cyl",
"-partition_sec_hd", "-partition_cyl_align", "-untranslated_name_len", "-partition_sec_hd", "-partition_cyl_align", "-untranslated_name_len",
"-rr_reloc_dir", "-hfsplus-serial-no", "-prep-boot-part", "-efi-boot-part", "-rr_reloc_dir", "-hfsplus-serial-no", "-prep-boot-part", "-efi-boot-part",
"-hfsplus-block-size", "-apm-block-size", "--grub2-mbr", "-hfsplus-block-size", "-apm-block-size", "--grub2-mbr",
"--grub2-sparc-core", "--sort-weight-list", "--sort-weight-patterns", "--grub2-sparc-core", "--sort-weight-list", "--sort-weight-patterns",
"-hppa-hdrversion", "-file_name_limit", "--set_all_file_dates", "-hppa-hdrversion", "-file_name_limit", "--set_all_file_dates",
"--gpt_disk_guid", "" "--gpt_disk_guid", "-iso_mbr_part_type", "-eltorito-platform",
""
}; };
static char arg2_options[][41]= { static char arg2_options[][41]= {
"-hfs-bless-by", "--scdbackup_tag", "--sort-weight", "-hfs-bless-by", "--scdbackup_tag", "--sort-weight",
"" ""
}; };
static char arg3_options[][41]= { static char arg3_options[][41]= {
"-append_partition", "-hfsplus-file-creator-type", "-append_partition", "-hfsplus-file-creator-type",
"" ""
}; };
static char final_options[][41]= { static char final_options[][41]= {
skipping to change at line 748 skipping to change at line 749
Text_shellsafe(argpt, xorriso->info_text, 1); Text_shellsafe(argpt, xorriso->info_text, 1);
if(!(flag & 1)) if(!(flag & 1))
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
return(1); return(1);
} }
int Xorriso_genisofs_add_boot(struct XorrisO *xorriso, int flag) int Xorriso_genisofs_add_boot(struct XorrisO *xorriso, int flag)
{ {
int ret; int ret;
if(xorriso->boot_img_size_default && xorriso->boot_image_emul == 0)
xorriso->boot_img_full_size= 1;
ret= Xorriso_attach_boot_image(xorriso, 0); ret= Xorriso_attach_boot_image(xorriso, 0);
if(ret <= 0) if(ret <= 0)
xorriso->boot_image_bin_path[0]= 0; xorriso->boot_image_bin_path[0]= 0;
return(ret); return(ret);
} }
int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag) int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
{ {
static char helptext[][160]= { static char helptext[][160]= {
"Usage: xorriso -as mkisofs [options] file...", "Usage: xorriso -as mkisofs [options] file...",
skipping to change at line 849 skipping to change at line 852
" -jigdo-exclude PATTERN Pattern(s) to exclude from the jigdo file", " -jigdo-exclude PATTERN Pattern(s) to exclude from the jigdo file",
" -jigdo-map PATTERN1=PATTERN2", " -jigdo-map PATTERN1=PATTERN2",
" Pattern(s) to map paths (e.g. Debian=/mirror/debi an)", " Pattern(s) to map paths (e.g. Debian=/mirror/debi an)",
" -md5-list FILE File containing MD5 sums of the files that should be checked", " -md5-list FILE File containing MD5 sums of the files that should be checked",
" -jigdo-template-compress ALGORITHM", " -jigdo-template-compress ALGORITHM",
" Choose to use gzip or bzip2 compression for templ ate data; default is gzip", " Choose to use gzip or bzip2 compression for templ ate data; default is gzip",
" -checksum_algorithm_iso alg1,alg2,...", " -checksum_algorithm_iso alg1,alg2,...",
" Specify the checksum types desired for the output image (in .jigdo)", " Specify the checksum types desired for the output image (in .jigdo)",
" -checksum_algorithm_template alg1,alg2,...", " -checksum_algorithm_template alg1,alg2,...",
" Specify the checksum types desired for the output jigdo template", " Specify the checksum types desired for the output jigdo template",
" -eltorito-platform Set El Torito platform id for the next boot entry ",
" -b FILE, -eltorito-boot FILE", " -b FILE, -eltorito-boot FILE",
" Set El Torito boot image name", " Set El Torito boot image name",
" -eltorito-alt-boot Start specifying alternative El Torito boot param eters", " -eltorito-alt-boot Start specifying alternative El Torito boot param eters",
" --efi-boot FILE Set El Torito EFI boot image name and type", " --efi-boot FILE Set El Torito EFI boot image name and type",
" -e FILE Set EFI boot image name (more rawly)", " -e FILE Set EFI boot image name (more rawly)",
" -c FILE, -eltorito-catalog FILE", " -c FILE, -eltorito-catalog FILE",
" Set El Torito boot catalog name", " Set El Torito boot catalog name",
" --boot-catalog-hide Hide boot catalog from ISO9660/RR and Joliet", " --boot-catalog-hide Hide boot catalog from ISO9660/RR and Joliet",
" -boot-load-size # Set numbers of load sectors", " -boot-load-size # Set numbers of load sectors",
" -hard-disk-boot Boot image is a hard disk image", " -hard-disk-boot Boot image is a hard disk image",
" -no-emul-boot Boot image is 'no emulation' image", " -no-emul-boot Boot image is 'no emulation' image",
" -boot-info-table Patch boot image with info table", " -boot-info-table Patch boot image with info table",
" --grub2-boot-info Patch boot image at byte 2548", " --grub2-boot-info Patch boot image at byte 2548",
" -eltorito-id ID Set El Torito Id String", " -eltorito-id ID Set El Torito Id String",
" -eltorito-selcrit HEXBYTES Set El Torito Selection Criteria", " -eltorito-selcrit HEXBYTES Set El Torito Selection Criteria",
" -isohybrid-gpt-basdat Mark El Torito boot image as Basic Data in GPT", " -isohybrid-gpt-basdat Mark El Torito boot image as Basic Data in GPT",
" -isohybrid-gpt-hfsplus Mark El Torito boot image as HFS+ in GPT", " -isohybrid-gpt-hfsplus Mark El Torito boot image as HFS+ in GPT",
" -isohybrid-apm-hfsplus Mark El Torito boot image as HFS+ in APM", " -isohybrid-apm-hfsplus Mark El Torito boot image as HFS+ in APM",
" -part_like_isohybrid Mark in MBR, GPT, APM without -isohybrid-mbr", " -part_like_isohybrid Mark in MBR, GPT, APM without -isohybrid-mbr",
" -iso_mbr_part_type Set type byte of ISO partition in MBR",
" --gpt_disk_guid GUID Set GPT disk GUID or choose automatic GUID", " --gpt_disk_guid GUID Set GPT disk GUID or choose automatic GUID",
" -G FILE, -generic-boot FILE Set generic boot image name", " -G FILE, -generic-boot FILE Set generic boot image name",
" --embedded-boot FILE Alias of -G", " --embedded-boot FILE Alias of -G",
" --protective-msdos-label Patch System Area by partition table", " --protective-msdos-label Patch System Area by partition table",
" --mbr-force-bootable Enforce existence of bootable flag in MBR", " --mbr-force-bootable Enforce existence of bootable flag in MBR",
" -partition_offset LBA Make image mountable by first partition, too", " -partition_offset LBA Make image mountable by first partition, too",
" -partition_sec_hd NUMBER Define number of sectors per head", " -partition_sec_hd NUMBER Define number of sectors per head",
" -partition_hd_cyl NUMBER Define number of heads per cylinder", " -partition_hd_cyl NUMBER Define number of heads per cylinder",
" -partition_cyl_align MODE Control cylinder alignment: off, on, auto, all", " -partition_cyl_align MODE Control cylinder alignment: off, on, auto, all",
" -mips-boot FILE Set mips boot image name (relative to image root) ", " -mips-boot FILE Set mips boot image name (relative to image root) ",
skipping to change at line 1253 skipping to change at line 1258
*/ */
if(xorriso->stdio_sync_is_default) if(xorriso->stdio_sync_is_default)
Xorriso_option_stdio_sync(xorriso, "off", 0); Xorriso_option_stdio_sync(xorriso, "off", 0);
Xorriso_free_meM(sfe); Xorriso_free_meM(sfe);
ret= 1; ret= 1;
ex:; ex:;
return(ret); return(ret);
} }
int Xorriso_genisofs_platform(struct XorrisO *xorriso, char *id, int flag)
{
unsigned int u;
char re_id[64];
if(strcmp(id, "x86") == 0)
return(0);
else if(strcmp(id, "PPC") == 0)
return(1);
else if(strcmp(id, "Mac") == 0)
return(2);
else if(strcmp(id, "efi") == 0)
return(0xef);
u= 0x100;
if(strncmp(id, "0x", 2) == 0) {
sscanf(id + 2, "%x", &u);
} else {
sscanf(id, "%u", &u);
sprintf(re_id, "%u", u);
if(strcmp(id, re_id) != 0)
goto wrong_id;
}
if(u <= 0xff)
return((int) u);
wrong_id:;
sprintf(xorriso->info_text,
"Unrecognized El Torito Platform Id : '%.16s%s'",
id, strlen(id) > 16 ? "..." : "");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
sprintf(xorriso->info_text,
"Recognizable are: x86, PPC, Mac, efi, [0...255], [0x00...0xff]");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "HINT", 0);
return(-1);
}
/* micro emulation of mkisofs */ /* micro emulation of mkisofs */
int Xorriso_genisofs(struct XorrisO *xorriso, char *whom, int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
int argc, char **argv, int flag) int argc, char **argv, int flag)
{ {
int ret, i, j, was_path= 0, was_other_option= 0, mem_graft_points, mem; int ret, i, j, was_path= 0, was_other_option= 0, mem_graft_points, mem;
int do_print_size= 0, fd, idx, iso_level= -1, palohdrversion; int do_print_size= 0, fd, idx, iso_level= -1, palohdrversion;
int was_failure= 0, fret, lower_r= 0, zero= 0; int was_failure= 0, fret, lower_r= 0, zero= 0;
int dir_mode= -1, file_mode= -1, count, partition_number; int dir_mode= -1, file_mode= -1, count, partition_number;
int allow_dir_id_ext= -1; int allow_dir_id_ext= -1;
int root_seen= 0, do_md5_mem, option_d= 0, arg_count; int root_seen= 0, do_md5_mem, option_d= 0, arg_count;
mode_t mode_and, mode_or; mode_t mode_and, mode_or;
int with_boot_image= 0, with_cat_path= 0, with_emul_toc= 0; int with_boot_image= 0, with_cat_path= 0, with_emul_toc= 0;
int old_root_md5= 1, old_root_dev= 0, old_root_ino= 1, sort_file_pattern= 0; int old_root_md5= 1, old_root_dev= 0, old_root_ino= 1, sort_file_pattern= 0;
int *weight_list= NULL, weight_count= 0; int *weight_list= NULL, weight_count= 0;
int *delay_opt_list= NULL, delay_opt_count= 0; int *delay_opt_list= NULL, delay_opt_count= 0;
int mkisofs_b_platform_id= 0x00;
char *sfe= NULL, *adr= NULL, ra_text[80], *pathspec= NULL, *sort_file= NULL; char *sfe= NULL, *adr= NULL, ra_text[80], *pathspec= NULL, *sort_file= NULL;
char *ept, *add_pt, *eff_path= NULL, *indev= NULL, msc[80], *cpt; char *ept, *add_pt, *eff_path= NULL, *indev= NULL, msc[80], *cpt;
char *old_root= NULL, *argpt, *hargv[1]; char *old_root= NULL, *argpt, *hargv[1];
char *boot_path, partno_text[8], *iso_rr_pt, *disk_pt, *rpt, *wpt; char *boot_path, partno_text[8], *iso_rr_pt, *disk_pt, *rpt, *wpt;
char *rm_merge_args[3], *rr_reloc_dir_pt= NULL; char *rm_merge_args[3], *rr_reloc_dir_pt= NULL;
char *sort_weight_args[4], *bless_args[6], *sa_path; char *sort_weight_args[4], *bless_args[6], *sa_path;
struct stat stbuf; struct stat stbuf;
Xorriso_alloc_meM(sfe, char, 5*SfileadrL); Xorriso_alloc_meM(sfe, char, 5*SfileadrL);
skipping to change at line 1340 skipping to change at line 1383
adr[0]= indev[0]= msc[0]= old_root[0]= sort_file[0]= 0; adr[0]= indev[0]= msc[0]= old_root[0]= sort_file[0]= 0;
for(i= 0; i<argc; i++) { for(i= 0; i<argc; i++) {
ret= Xorriso_genisofs_strip_dash(xorriso, argv[i], &argpt, 0); ret= Xorriso_genisofs_strip_dash(xorriso, argv[i], &argpt, 0);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
ret= Xorriso_genisofs_ignore(xorriso, whom, argpt, &i, 1); ret= Xorriso_genisofs_ignore(xorriso, whom, argpt, &i, 1);
if(ret == 1) if(ret == 1)
continue; continue;
if(strcmp(argpt, "-version")==0) { if(strcmp(argpt, "-version")==0) {
sprintf(xorriso->result_line, sprintf(xorriso->result_line,
"mkisofs 2.01-Emulation Copyright (C) 2013 see libburnia-project.org xorriso\n" "mkisofs 2.01-Emulation Copyright (C) 2017 see libburnia-project.org xorriso\n"
); );
fd= xorriso->dev_fd_1; fd= xorriso->dev_fd_1;
if(fd<0) if(fd<0)
fd= 1; fd= 1;
ret= write(fd, xorriso->result_line, strlen(xorriso->result_line)); ret= write(fd, xorriso->result_line, strlen(xorriso->result_line));
/* (result of write intentionally ignored) */ /* (result of write intentionally ignored) */
fsync(fd); fsync(fd);
Xorriso_option_version(xorriso, 0); Xorriso_option_version(xorriso, 0);
} else if(strcmp(argpt, "-o")==0 || strcmp(argpt, "-output")==0) { } else if(strcmp(argpt, "-o")==0 || strcmp(argpt, "-output")==0) {
skipping to change at line 1876 skipping to change at line 1919
strcmp(argpt, "--boot-catalog-hide")==0 || strcmp(argpt, "--boot-catalog-hide")==0 ||
strcmp(argpt, "-isohybrid-gpt-basdat")==0 || strcmp(argpt, "-isohybrid-gpt-basdat")==0 ||
strcmp(argpt, "-isohybrid-gpt-hfsplus")==0 || strcmp(argpt, "-isohybrid-gpt-hfsplus")==0 ||
strcmp(argpt, "-isohybrid-apm-hfsplus")==0 || strcmp(argpt, "-isohybrid-apm-hfsplus")==0 ||
strcmp(argpt, "-part_like_isohybrid")==0) { strcmp(argpt, "-part_like_isohybrid")==0) {
delay_opt_list[delay_opt_count++]= i; delay_opt_list[delay_opt_count++]= i;
if(argv[i] != argpt) if(argv[i] != argpt)
delay_opt_list[delay_opt_count - 1]|= 1<<31; delay_opt_list[delay_opt_count - 1]|= 1<<31;
} else if(strcmp(argpt, "-b") == 0 || } else if(strcmp(argpt, "-b") == 0 ||
strcmp(argpt, "-eltorito-boot") == 0 || strcmp(argpt, "-eltorito-boot") == 0 ||
strcmp(argpt, "-eltorito-platform") == 0 ||
strcmp(argpt, "--efi-boot") == 0 || strcmp(argpt, "--efi-boot") == 0 ||
strcmp(argpt, "-e") == 0 || strcmp(argpt, "-e") == 0 ||
strcmp(argpt, "-mips-boot") == 0 || strcmp(argpt, "-mips-boot") == 0 ||
strcmp(argpt, "-mipsel-boot") == 0 || strcmp(argpt, "-mipsel-boot") == 0 ||
strcmp(argpt, "-c") == 0 || strcmp(argpt, "-c") == 0 ||
strcmp(argpt, "-eltorito-catalog") == 0 || strcmp(argpt, "-eltorito-catalog") == 0 ||
strcmp(argpt, "-boot-load-size") == 0 || strcmp(argpt, "-boot-load-size") == 0 ||
strcmp(argpt, "-eltorito-id") == 0 || strcmp(argpt, "-eltorito-id") == 0 ||
strcmp(argpt, "-eltorito-selcrit") == 0 || strcmp(argpt, "-eltorito-selcrit") == 0 ||
strcmp(argpt, "--embedded-boot")==0 || strcmp(argpt, "--embedded-boot")==0 ||
strcmp(argpt, "-generic-boot")==0 || strcmp(argpt, "-generic-boot")==0 ||
strcmp(argpt, "-G") == 0 || strcmp(argpt, "-G") == 0 ||
strcmp(argpt, "-partition_offset") == 0 || strcmp(argpt, "-partition_offset") == 0 ||
strcmp(argpt, "-partition_hd_cyl") == 0 || strcmp(argpt, "-partition_hd_cyl") == 0 ||
strcmp(argpt, "-partition_sec_hd") == 0 || strcmp(argpt, "-partition_sec_hd") == 0 ||
strcmp(argpt, "-partition_cyl_align") == 0 || strcmp(argpt, "-partition_cyl_align") == 0 ||
strcmp(argpt, "-isohybrid-mbr") == 0 || strcmp(argpt, "-isohybrid-mbr") == 0 ||
strcmp(argpt, "--grub2-mbr") == 0 || strcmp(argpt, "--grub2-mbr") == 0 ||
strncmp(argpt, "-hppa-", 6) == 0 || strncmp(argpt, "-hppa-", 6) == 0 ||
strcmp(argpt, "-alpha-boot") == 0 || strcmp(argpt, "-alpha-boot") == 0 ||
strcmp(argpt, "--gpt_disk_guid") == 0) { strcmp(argpt, "--gpt_disk_guid") == 0 ||
strcmp(argpt, "-iso_mbr_part_type") == 0) {
if(i+1>=argc) if(i+1>=argc)
goto not_enough_args; goto not_enough_args;
delay_opt_list[delay_opt_count++]= i; delay_opt_list[delay_opt_count++]= i;
if(argv[i] != argpt) if(argv[i] != argpt)
delay_opt_list[delay_opt_count - 1]|= 1<<31; delay_opt_list[delay_opt_count - 1]|= 1<<31;
i++; i++;
} else if(strncmp(argpt, "--modification-date=", 20)==0) { } else if(strncmp(argpt, "--modification-date=", 20)==0) {
ret= Xorriso_option_volume_date(xorriso, "uuid", argpt + 20, 0); ret= Xorriso_option_volume_date(xorriso, "uuid", argpt + 20, 0);
if(ret <= 0) if(ret <= 0)
goto problem_handler_2; goto problem_handler_2;
skipping to change at line 2397 skipping to change at line 2442
boot_path= xorriso->boot_image_bin_path; boot_path= xorriso->boot_image_bin_path;
xorriso->boot_efi_default= 1; xorriso->boot_efi_default= 1;
xorriso->boot_image_emul= 0; xorriso->boot_image_emul= 0;
xorriso->boot_emul_default= 0; xorriso->boot_emul_default= 0;
} else { } else {
boot_path= xorriso->boot_image_bin_path; boot_path= xorriso->boot_image_bin_path;
if(strcmp(argpt, "-e") == 0) if(strcmp(argpt, "-e") == 0)
xorriso->boot_platform_id= 0xef; xorriso->boot_platform_id= 0xef;
else else
xorriso->boot_platform_id= 0x00; xorriso->boot_platform_id= mkisofs_b_platform_id;
xorriso->boot_efi_default= 0; xorriso->boot_efi_default= 0;
if(xorriso->boot_emul_default) if(xorriso->boot_emul_default)
xorriso->boot_image_emul= 2; xorriso->boot_image_emul= 2;
} }
boot_path[0]= 0; boot_path[0]= 0;
if(argv[i][0] != '/' && strncmp(argv[i], "--interval:", 11) != 0) if(argv[i][0] != '/' && strncmp(argv[i], "--interval:", 11) != 0)
strcat(boot_path, "/"); strcat(boot_path, "/");
ret= Sfile_str(boot_path + strlen(boot_path), argv[i], 0); ret= Sfile_str(boot_path + strlen(boot_path), argv[i], 0);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
if(xorriso->boot_efi_default && xorriso->boot_image_bin_path[0]) { if(xorriso->boot_efi_default && xorriso->boot_image_bin_path[0]) {
ret= Xorriso_genisofs_add_boot(xorriso, 0); ret= Xorriso_genisofs_add_boot(xorriso, 0);
if(ret <= 0) if(ret <= 0)
goto problem_handler_boot; goto problem_handler_boot;
} }
xorriso->keep_boot_image= 0; xorriso->keep_boot_image= 0;
with_boot_image= 1; with_boot_image= 1;
} else if(strcmp(argpt, "-eltorito-platform") == 0) {
if(i + 1>=argc)
goto not_enough_args;
i++;
mem= mkisofs_b_platform_id;
mkisofs_b_platform_id= Xorriso_genisofs_platform(xorriso, argv[i], 0);
if(mkisofs_b_platform_id < 0) {
mkisofs_b_platform_id= 0;
goto problem_handler_boot;
}
if(mkisofs_b_platform_id != mem &&
xorriso->boot_image_bin_path[0] != 0) {
ret= Xorriso_genisofs_add_boot(xorriso, 0);
if(ret <= 0)
goto problem_handler_boot;
}
} else if(strcmp(argpt, "-c") == 0 || } else if(strcmp(argpt, "-c") == 0 ||
strcmp(argpt, "-eltorito-catalog") == 0) { strcmp(argpt, "-eltorito-catalog") == 0) {
if(i+1>=argc) if(i+1>=argc)
goto not_enough_args; goto not_enough_args;
i++; i++;
xorriso->boot_image_cat_path[0]= 0; xorriso->boot_image_cat_path[0]= 0;
if(argv[i][0] != '/') if(argv[i][0] != '/')
strcat(xorriso->boot_image_cat_path, "/"); strcat(xorriso->boot_image_cat_path, "/");
ret= Sfile_str(xorriso->boot_image_cat_path ret= Sfile_str(xorriso->boot_image_cat_path
+ strlen(xorriso->boot_image_cat_path), argv[i], 0); + strlen(xorriso->boot_image_cat_path), argv[i], 0);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
if(with_cat_path == 0) if(with_cat_path == 0)
with_cat_path= 1; with_cat_path= 1;
} else if(strcmp(argpt, "-boot-load-size") == 0) { } else if(strcmp(argpt, "-boot-load-size") == 0) {
if(i+1>=argc) if(i+1>=argc)
goto not_enough_args; goto not_enough_args;
i++; i++;
sscanf(argv[i], "%d", &ret); if(strcmp(argv[i], "full") == 0) {
xorriso->boot_image_load_size= ret * 512; xorriso->boot_img_full_size= 1;
} else {
sscanf(argv[i], "%d", &ret);
xorriso->boot_image_load_size= ret * 512;
}
xorriso->boot_img_size_default= 0;
} else if(strcmp(argpt, "-eltorito-id") == 0 || } else if(strcmp(argpt, "-eltorito-id") == 0 ||
strcmp(argpt, "-eltorito-selcrit") == 0) { strcmp(argpt, "-eltorito-selcrit") == 0) {
if(i+1>=argc) if(i+1>=argc)
goto not_enough_args; goto not_enough_args;
i++; i++;
if(strcmp(argpt, "-eltorito-id") == 0) if(strcmp(argpt, "-eltorito-id") == 0)
sprintf(sfe, "id_string=%s", argv[i]); sprintf(sfe, "id_string=%s", argv[i]);
else else
sprintf(sfe, "sel_crit=%s", argv[i]); sprintf(sfe, "sel_crit=%s", argv[i]);
ret= Xorriso_option_boot_image(xorriso, "any", sfe, 0); ret= Xorriso_option_boot_image(xorriso, "any", sfe, 0);
skipping to change at line 2464 skipping to change at line 2531
(1 << 2); (1 << 2);
} else if(strcmp(argpt, "-isohybrid-gpt-hfsplus") == 0) { } else if(strcmp(argpt, "-isohybrid-gpt-hfsplus") == 0) {
xorriso->patch_isolinux_image = (xorriso->patch_isolinux_image & ~0x0fc) | xorriso->patch_isolinux_image = (xorriso->patch_isolinux_image & ~0x0fc) |
(2 << 2); (2 << 2);
} else if(strcmp(argpt, "-isohybrid-apm-hfsplus") == 0) { } else if(strcmp(argpt, "-isohybrid-apm-hfsplus") == 0) {
xorriso->patch_isolinux_image = xorriso->patch_isolinux_image | (1 << 8); xorriso->patch_isolinux_image = xorriso->patch_isolinux_image | (1 << 8);
} else if(strcmp(argpt, "-part_like_isohybrid") == 0) { } else if(strcmp(argpt, "-part_like_isohybrid") == 0) {
xorriso->part_like_isohybrid= 1; xorriso->part_like_isohybrid= 1;
} else if(strcmp(argpt, "-iso_mbr_part_type") == 0) {
if(i + 1 >= argc)
goto not_enough_args;
i++;
sprintf(sfe, "iso_mbr_part_type=%s", argv[i]);
ret= Xorriso_option_boot_image(xorriso, "any", sfe, 0);
if(ret <= 0)
goto problem_handler_boot;
} else if(strcmp(argpt, "--gpt_disk_guid") == 0) { } else if(strcmp(argpt, "--gpt_disk_guid") == 0) {
if(i + 1 >= argc) if(i + 1 >= argc)
goto not_enough_args; goto not_enough_args;
i++; i++;
ret= Xorriso_parse_gpt_guid(xorriso, argv[i], 0); ret= Xorriso_parse_gpt_guid(xorriso, argv[i], 0);
if(ret <= 0) if(ret <= 0)
goto problem_handler_boot; goto problem_handler_boot;
} else if(strcmp(argpt, "-eltorito-alt-boot")==0) { } else if(strcmp(argpt, "-eltorito-alt-boot")==0) {
ret= Xorriso_genisofs_add_boot(xorriso, 0); ret= Xorriso_genisofs_add_boot(xorriso, 0);
skipping to change at line 2612 skipping to change at line 2688
strcpy(xorriso->boot_image_cat_path, "/boot.catalog"); strcpy(xorriso->boot_image_cat_path, "/boot.catalog");
/* The boot catalog has to be hidden separately */ /* The boot catalog has to be hidden separately */
if(xorriso->boot_image_cat_path[0]) { if(xorriso->boot_image_cat_path[0]) {
ret= Xorriso_path_is_hidden(xorriso, xorriso->boot_image_cat_path, 0); ret= Xorriso_path_is_hidden(xorriso, xorriso->boot_image_cat_path, 0);
if(ret > 0) if(ret > 0)
xorriso->boot_image_cat_hidden|= ret; xorriso->boot_image_cat_hidden|= ret;
else if(ret < 0) else if(ret < 0)
was_failure= 1; was_failure= 1;
} }
/* Enforce the -boot-load-size default of mkisofs */
if(with_boot_image && xorriso->boot_img_size_default &&
xorriso->boot_image_emul == 0)
xorriso->boot_img_full_size= 1;
if(xorriso->no_emul_toc & 1) if(xorriso->no_emul_toc & 1)
xorriso->do_padding_by_libisofs= 1; xorriso->do_padding_by_libisofs= 1;
if(do_print_size) { if(do_print_size) {
ret= Xorriso_option_print_size(xorriso, 1); ret= Xorriso_option_print_size(xorriso, 1);
goto ex; goto ex;
} }
ret= !was_failure; ret= !was_failure;
ex:; ex:;
 End of changes. 16 change blocks. 
8 lines changed or deleted 89 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)