From 10233adb871dd9d254c0b705f299e87d14bf851d Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Fri, 25 Jun 2010 17:59:01 +0000 Subject: [PATCH] New option -read_mkisofsrc interprets .mkisofsrc --- xorriso/base_obj.c | 1 + xorriso/opts_d_h.c | 2 + xorriso/opts_p_z.c | 17 +++- xorriso/parse_exec.c | 149 +++++++++++++++++++++++++++++++++++- xorriso/parse_exec.h | 1 + xorriso/sfile.c | 2 +- xorriso/xorriso.1 | 24 +++++- xorriso/xorriso.h | 5 ++ xorriso/xorriso.info | 136 +++++++++++++++++--------------- xorriso/xorriso.texi | 32 ++++++-- xorriso/xorriso_private.h | 3 + xorriso/xorriso_timestamp.h | 2 +- 12 files changed, 298 insertions(+), 76 deletions(-) diff --git a/xorriso/base_obj.c b/xorriso/base_obj.c index cfd17c42..8a390460 100644 --- a/xorriso/base_obj.c +++ b/xorriso/base_obj.c @@ -95,6 +95,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag) for(i=0;irc_filename_count-1;i++) strcpy(m->rc_filenames[i],Xorriso_sys_rc_nameS[i]); m->rc_filenames[m->rc_filename_count-1][0]= 0; + m->mkisofsrc_done= 0; m->wdi[0]= 0; strcpy(m->wdx, m->initial_wdx); diff --git a/xorriso/opts_d_h.c b/xorriso/opts_d_h.c index 5ec24751..fae0bdf8 100644 --- a/xorriso/opts_d_h.c +++ b/xorriso/opts_d_h.c @@ -1741,6 +1741,8 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag) " -no-emul-boot|-b|-c|-boot-info-table|-boot-load-size|-G]", " Perform some mkisofs gestures, understand pathspecs as mkisofs", " does. Commit happens outside emulation at usual occasions.", +" -read_mkisofsrc", +" Read and interpret the .mkisofsrc configuration file.", " -as cdrecord [-help|-v|dev=|speed=|blank=|fs=|-eject|-atip|padsize=|-multi]", " path|-", " Perform some cdrecord gestures, eventually write at most one", diff --git a/xorriso/opts_p_z.c b/xorriso/opts_p_z.c index d1e2b243..9bc17c9f 100644 --- a/xorriso/opts_p_z.c +++ b/xorriso/opts_p_z.c @@ -349,6 +349,15 @@ int Xorriso_option_pwdx(struct XorrisO *xorriso, int flag) } +int Xorriso_option_read_mkisofsrc(struct XorrisO *xorriso, int flag) +{ + int ret; + + ret= Xorriso_read_mkisofsrc(xorriso, 0); + return(ret); +} + + /* Option -reassure "on"|"tree"|"off" */ int Xorriso_option_reassure(struct XorrisO *xorriso, char *mode, int flag) { @@ -1561,6 +1570,8 @@ int Xorriso_option_version(struct XorrisO *xorriso, int flag) /* Option -volid */ +/* @param flag bit0= do not warn of problematic volid +*/ int Xorriso_option_volid(struct XorrisO *xorriso, char *volid, int flag) { int warn_shell= 0, warn_ecma= 0, i, ret; @@ -1579,17 +1590,17 @@ int Xorriso_option_volid(struct XorrisO *xorriso, char *volid, int flag) Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); return(0); } - if(warn_shell) { + if(warn_shell && !(flag & 1)) { sprintf(xorriso->info_text, "-volid text problematic as automatic mount point name"); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0); } - if(xorriso->do_joliet && strlen(volid)>16) { + if(xorriso->do_joliet && strlen(volid)>16 && !(flag & 1)) { sprintf(xorriso->info_text, "-volid text is too long for Joliet (%d > 16)",(int) strlen(volid)); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0); } - if(warn_ecma) { + if(warn_ecma && !(flag & 1)) { sprintf(xorriso->info_text, "-volid text does not comply to ISO 9660 / ECMA 119 rules"); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0); diff --git a/xorriso/parse_exec.c b/xorriso/parse_exec.c index 55170d45..1b3a124e 100644 --- a/xorriso/parse_exec.c +++ b/xorriso/parse_exec.c @@ -449,7 +449,8 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv, "ban_stdio_write","close_filter_list","commit","devices","end", "for_backup", "help", "list_formats","no_rc","print_size","pvd_info","pwd","pwdi","pwdx", - "rollback","rollback_end","tell_media_space","toc","version", + "read_mkisofsrc","rollback","rollback_end", + "tell_media_space","toc","version", "" }; static char arg1_commands[][40]= { @@ -1136,6 +1137,9 @@ next_command:; (*idx)++; ret= Xorriso_option_path_list(xorriso, arg1, 1); + } else if(strcmp(cmd,"read_mkisofsrc")==0) { + ret= Xorriso_option_read_mkisofsrc(xorriso, 0); + } else if(strcmp(cmd,"reassure")==0) { (*idx)++; ret= Xorriso_option_reassure(xorriso, arg1, 0); @@ -1594,6 +1598,144 @@ ex:; } +int Xorriso_read_as_mkisofsrc(struct XorrisO *xorriso, char *path, int flag) +{ + int ret, linecount= 0; + FILE *fp= NULL; + char *sret, line[SfileadrL], *cpt, *wpt; + + ret= Xorriso_afile_fopen(xorriso, path, "rb", &fp, 1 | 2); + if(ret <= 0) + {ret= 0; goto ex;} + while(1) { + sret= Sfile_fgets_n(line, SfileadrL - 1, fp, 0); + if(sret == NULL) { + if(ferror(fp)) + {ret= 0; goto ex;} + break; + } + linecount++; + + /* Interpret line */ + if(line[0] == 0 || line[0] == '#') + continue; + cpt= strchr(line, '='); + if(cpt == NULL) { + + /* >>> ??? complain ? abort reading ? */; + + continue; + } + *cpt= 0; + /* Names are not case sensitive */ + for(wpt= line; wpt < cpt; wpt++) + if(*wpt >= 'a' && *wpt <= 'z') + *wpt= toupper(*wpt); + /* Remove trailing whitespace from name */ + for(wpt= cpt - 1; wpt >= line ; wpt--) + if(*wpt == ' ' || *wpt == '\t') + *wpt= 0; + else + break; + /* Remove trailing whitespace from value */ + for(wpt= cpt + 1 + strlen(cpt + 1) - 1; wpt >= cpt; wpt--) + if(*wpt == ' ' || *wpt == '\t') + *wpt= 0; + else + break; + /* Remove leading whitespace from value */ + for(cpt++; *cpt == ' ' || *cpt == '\t'; cpt++); + + if(strcmp(line, "APPI") == 0) { + ret= Xorriso_option_application_id(xorriso, cpt, 0); + } else if(strcmp(line, "COPY") == 0) { + + /* >>> to come: -copyright_file */; + + ret= 1; + } else if(strcmp(line, "ABST") == 0) { + + /* >>> to come: -abstract_file */; + + ret= 1; + } else if(strcmp(line, "BIBL") == 0) { + + /* >>> to come: -biblio_file */; + + ret= 1; + } else if(strcmp(line, "PREP") == 0) { + /* Not planned to come */ + ret= 1; + } else if(strcmp(line, "PUBL") == 0) { + ret= Xorriso_option_publisher(xorriso, cpt, 0); + } else if(strcmp(line, "SYSI") == 0) { + ret= Xorriso_option_system_id(xorriso, cpt, 0); + } else if(strcmp(line, "VOLI") == 0) { + ret= Xorriso_option_volid(xorriso, cpt, 1); + } else if(strcmp(line, "VOLS") == 0) { + ret= Xorriso_option_volset_id(xorriso, cpt, 0); + } else if(strcmp(line, "HFS_TYPE") == 0) { + /* Not planned to come */ + ret= 1; + } else if(strcmp(line, "HFS_CREATOR") == 0) { + /* Not planned to come */ + ret= 1; + } else { + + /* >>> ??? complain ? abort reading ? */; + + } + } + xorriso->mkisofsrc_done= 1; + ret= 1; +ex: + if(fp != NULL) + fclose(fp); + return(ret); +} + + +/* ./.mkisofsrc , getenv("MKISOFSRC") , + $HOME/.mkisofsrc , $(basename $0)/.mkisofsrc + */ +int Xorriso_read_mkisofsrc(struct XorrisO *xorriso, int flag) +{ + char path[SfileadrL], *cpt; + int ret; + + ret= Xorriso_read_as_mkisofsrc(xorriso, "./.mkisofsrc", 0); + if(ret > 0) + return(ret); + cpt= getenv("MKISOFSRC"); + if(cpt != NULL) { + strncpy(path, cpt, SfileadrL - 1); + path[SfileadrL - 1]= 0; + ret= Xorriso_read_as_mkisofsrc(xorriso, path, 0); + if(ret > 0) + return(ret); + } + cpt= getenv("HOME"); + if(cpt != NULL) { + strncpy(path, cpt, SfileadrL - 1 - 11); + path[SfileadrL - 1 - 11]= 0; + strcat(path, "/.mkisofsrc"); + ret= Xorriso_read_as_mkisofsrc(xorriso, path, 0); + if(ret > 0) + return(ret); + } + strcpy(path, xorriso->progname); + cpt= strrchr(path, '/'); + if(cpt != NULL) { + strcpy(cpt + 1, ".mkisofsrc"); + ret= Xorriso_read_as_mkisofsrc(xorriso, path, 0); + if(ret > 0) + return(ret); + } + /* no .mkisofsrc file found */ + return(2); +} + + int Xorriso_read_rc(struct XorrisO *xorriso, int flag) { int ret,i,was_failure= 0,fret; @@ -1618,6 +1760,11 @@ int Xorriso_read_rc(struct XorrisO *xorriso, int flag) continue; return(ret); } + if(xorriso->argument_emulation == 1 && !xorriso->mkisofsrc_done) { + ret= Xorriso_read_mkisofsrc(xorriso, 0); + if(ret <= 0) + was_failure= 1; + } return(!was_failure); } diff --git a/xorriso/parse_exec.h b/xorriso/parse_exec.h index ab5d012f..c67311a6 100644 --- a/xorriso/parse_exec.h +++ b/xorriso/parse_exec.h @@ -86,6 +86,7 @@ int Xorriso_path_is_hidden(struct XorrisO *xorriso, char *path, int flag); int Xorriso_normalize_acl_text(struct XorrisO *xorriso, char *in_text, char **access_acl_text, char **default_acl_text, int flag); +int Xorriso_read_mkisofsrc(struct XorrisO *xorriso, int flag); #endif /* ! Xorriso_pvt_cmd_includeD */ diff --git a/xorriso/sfile.c b/xorriso/sfile.c index 11359a1c..f2b7280e 100644 --- a/xorriso/sfile.c +++ b/xorriso/sfile.c @@ -28,7 +28,7 @@ #include "sfile.h" -/* @param flag bit0= do not clip of carriage return at line end +/* @param flag bit0= do not clip off carriage return at line end */ char *Sfile_fgets_n(char *line, int maxl, FILE *fp, int flag) { diff --git a/xorriso/xorriso.1 b/xorriso/xorriso.1 index 7497a235..25f458c7 100644 --- a/xorriso/xorriso.1 +++ b/xorriso/xorriso.1 @@ -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 "Jun 24, 2010" +.TH XORRISO 1 "Jun 25, 2010" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -389,8 +389,9 @@ An \fBMBR\fR contains boot code and a partition table. It does not hamper CDROM booting. The new MBR of a follow-up session can get in effect only on overwriteable media. .br -Emulation -as mkisofs supports the example options out of the ISOLINUX wiki. -It also supports the options used in GRUB script grub-mkrescue. +Emulation -as mkisofs supports the example options out of the ISOLINUX wiki, +the options used in GRUB script grub-mkrescue, and the example in the +FreeBSD AvgLiveCD wiki. .br The support for other boot image types is sparse. .br @@ -3184,7 +3185,8 @@ Personality "\fBmkisofs\fR" accepts the options listed with: .br -as mkisofs -help -- .br -Among them: -R (always on), -r, -J, -o, -M, -C, -path-list, -m, -exclude-list, +Among them: -R (always on), -r, -J, -o, -M, -C, -dir-mode, -file-mode, +-path-list, -m, -exclude-list, -f, -print-size, -pad, -no-pad, -V, -v, -version, -graft-points, -z, -no-emul-boot, -b, -c, -boot-info-table, -boot-load-size, -input-charset, -G, -output-charset, -U, -hide, -hide-joliet, -hide-list, -hide-joliet-list, @@ -3293,6 +3295,20 @@ to the command line arguments. I.e. all arguments will be interpreted cdrecord style until "--" is encountered and an eventual commit happens. From then on, options are interpreted as xorriso options. .TP +\fB\-read_mkisofsrc\fR +Try one by one to open for reading: + ./.mkisofsrc , $MKISOFSRC , $HOME/.mkisofsrc , $(basename $0)/.mkisofs +.br +On success interpret the file content as of man mkisofs CONFIGURATION, +and end this command. Do not try further files. +The last address is used only if start argument 0 has a non-trivial basename. +.br +The reader currently interprets the following NAME=VALUE pairs: +APPI (-application_id) , PUBL (-publisher) , SYSI (-system_id) , +VOLI (-volid) , VOLS (-volset_id) +.br +Any other lines will be silently ignored. +.TP \fB\-pacifier\fR behavior_code Control behavior of UPDATE pacifiers during write operations. The following behavior codes are defined: diff --git a/xorriso/xorriso.h b/xorriso/xorriso.h index 52e11520..94317b80 100644 --- a/xorriso/xorriso.h +++ b/xorriso/xorriso.h @@ -1015,6 +1015,9 @@ int Xorriso_option_pwdi(struct XorrisO *xorriso, int flag); /* Option -pwdx */ int Xorriso_option_pwdx(struct XorrisO *xorriso, int flag); +/* Option -read_mkisofsrc */ +int Xorriso_option_read_mkisofsrc(struct XorrisO *xorriso, int flag); + /* Option -reassure "on"|"tree"|"off" */ int Xorriso_option_reassure(struct XorrisO *xorriso, char *mode, int flag); @@ -1139,6 +1142,8 @@ int Xorriso_option_use_readline(struct XorrisO *xorriso, char *mode, int flag); int Xorriso_option_version(struct XorrisO *xorriso, int flag); /* Option -volid */ +/* @param flag bit0= do not warn of problematic volid +*/ int Xorriso_option_volid(struct XorrisO *xorriso, char *volid, int flag); /* Option -volset_id */ diff --git a/xorriso/xorriso.info b/xorriso/xorriso.info index 9dd943e3..5c020a31 100644 --- a/xorriso/xorriso.info +++ b/xorriso/xorriso.info @@ -345,7 +345,8 @@ needs of GRUB resp. ISOLINUX. An *MBR* contains boot code and a partition table. It does not hamper CDROM booting. The new MBR of a follow-up session can get in effect only on overwriteable media. Emulation -as mkisofs supports the example options out of the ISOLINUX -wiki. It also supports the options used in GRUB script grub-mkrescue. +wiki, the options used in GRUB script grub-mkrescue, and the example in +the FreeBSD AvgLiveCD wiki. The support for other boot image types is sparse. *ACL* are an advanced way of controlling access permissions to file @@ -2847,14 +2848,14 @@ programs trigger comparable actions. Personality "*mkisofs*" accepts the options listed with: -as mkisofs -help -- - Among them: -R (always on), -r, -J, -o, -M, -C, -path-list, -m, - -exclude-list, -f, -print-size, -pad, -no-pad, -V, -v, -version, - -graft-points, -z, -no-emul-boot, -b, -c, -boot-info-table, - -boot-load-size, -input-charset, -G, -output-charset, -U, -hide, - -hide-joliet, -hide-list, -hide-joliet-list, file paths and - pathspecs. A lot of options are not supported and lead to failure - of the mkisofs emulation. Some are ignored, but better do not rely - on this tolerance. + Among them: -R (always on), -r, -J, -o, -M, -C, -dir-mode, + -file-mode, -path-list, -m, -exclude-list, -f, -print-size, -pad, + -no-pad, -V, -v, -version, -graft-points, -z, -no-emul-boot, -b, + -c, -boot-info-table, -boot-load-size, -input-charset, -G, + -output-charset, -U, -hide, -hide-joliet, -hide-list, + -hide-joliet-list, file paths and pathspecs. A lot of options are + not supported and lead to failure of the mkisofs emulation. Some + are ignored, but better do not rely on this tolerance. -graft-points is equivalent to -pathspecs on. Note that pathspecs without "=" are interpreted differently than with xorriso option -add. Directories get merged with the root directory of the ISO @@ -2935,6 +2936,18 @@ programs trigger comparable actions. an eventual commit happens. From then on, options are interpreted as xorriso options. +-read_mkisofsrc + Try one by one to open for reading: ./.mkisofsrc , $MKISOFSRC , + $HOME/.mkisofsrc , $(basename $0)/.mkisofs + On success interpret the file content as of man mkisofs + CONFIGURATION, and end this command. Do not try further files. + The last address is used only if start argument 0 has a + non-trivial basename. + The reader currently interprets the following NAME=VALUE pairs: + APPI (-application_id) , PUBL (-publisher) , SYSI (-system_id) , + VOLI (-volid) , VOLS (-volset_id) + Any other lines will be silently ignored. + -pacifier behavior_code Control behavior of UPDATE pacifiers during write operations. The following behavior codes are defined: @@ -3795,7 +3808,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -out_charset sets output character set: SetWrite. (line 122) * -outdev aquires a drive for output: AqDrive. (line 29) * -overwrite enables overwriting in ISO: SetInsert. (line 127) -* -pacifier controls pacifier text form: Emulation. (line 107) +* -pacifier controls pacifier text form: Emulation. (line 119) * -padding sets amount of image padding: SetWrite. (line 205) * -page set terminal geometry: DialogCtl. (line 15) * -paste_in copies file into disk file: Restore. (line 117) @@ -3813,6 +3826,8 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -pwdx tells working directory on disk: Navigate. (line 23) * -quoted_not_list sets exclusions: SetInsert. (line 72) * -quoted_path_list inserts paths from disk file: Insert. (line 80) +* -read_mkisofsrc searches and reads .mkisofsrc file: Emulation. + (line 107) * -reassure enables confirmation question: DialogCtl. (line 28) * -report_about controls verbosity: Exception. (line 55) * -return_with controls exit value: Exception. (line 39) @@ -3822,7 +3837,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -rollback discards pending changes: Writing. (line 9) * -rollback_end ends program without writing: Scripting. (line 125) * -rom_toc_scan searches for sessions: Loading. (line 184) -* -scdbackup_tag enables scdbackup checksum tag: Emulation. (line 117) +* -scdbackup_tag enables scdbackup checksum tag: Emulation. (line 129) * -scsi_log reports SCSI commands: Scripting. (line 113) * -session_log logs written sessions: Scripting. (line 104) * -session_string composes session info line: Inquiry. (line 56) @@ -3867,7 +3882,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top [index] * Menu: -* ACL, _definiton: Extras. (line 36) +* ACL, _definiton: Extras. (line 37) * ACL, control handling, -acl: Loading. (line 123) * ACL, set in ISO image, -setfacl: Manip. (line 73) * ACL, set in ISO image, -setfacl_list: Manip. (line 100) @@ -3878,7 +3893,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Backslash Interpretation, _definition: Processing. (line 49) * Backup, enable fast incremental, -disk_dev_ino: Loading. (line 163) * Backup, enable features, -for_backup: Loading. (line 158) -* Backup, scdbackup checksum tag, -scdbackup: Emulation. (line 117) +* Backup, scdbackup checksum tag, -scdbackup: Emulation. (line 129) * Blank media, _definition: Media. (line 25) * Blind growing, _definition: Methods. (line 40) * Bootability, control, -boot_image: Bootable. (line 20) @@ -3917,9 +3932,10 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Drive, write and eject, -commit_eject: Writing. (line 40) * El Torito, _definiton: Extras. (line 19) * Emulation, -as: Emulation. (line 13) +* Emulation, .mkisofsrc, -read_mkisofsrc: Emulation. (line 107) * Emulation, cdrecord, -as: Emulation. (line 74) * Emulation, mkisofs, -as: Emulation. (line 16) -* Emulation, pacifier form, -pacifier: Emulation. (line 107) +* Emulation, pacifier form, -pacifier: Emulation. (line 119) * Examples: Examples. (line 6) * Filter, _definition: Filter. (line 6) * Filter, apply to file tree, -set_filter_r: Filter. (line 84) @@ -4082,7 +4098,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Write, predict image size, -print_size: Inquiry. (line 69) * Write, set speed, -speed: SetWrite. (line 148) * Write, simulation, -dummy: SetWrite. (line 188) -* xattr, _definiton: Extras. (line 50) +* xattr, _definiton: Extras. (line 51) * xattr, control handling, -xattr: Loading. (line 131) * xattr, set in ISO image, -setfattr: Manip. (line 110) * xattr, set in ISO image, -setfattr_list: Manip. (line 126) @@ -4100,50 +4116,50 @@ Node: Media6089 Node: Methods8519 Node: Drives11066 Node: Extras14372 -Node: Processing17770 -Node: Dialog21266 -Node: Options22923 -Node: AqDrive24491 -Node: Loading27397 -Node: Insert39576 -Node: SetInsert47933 -Node: Manip56500 -Node: CmdFind65181 -Node: Filter75132 -Node: Writing79481 -Node: SetWrite85770 -Node: Bootable96054 -Node: Charset104006 -Node: Exception106760 -Node: DialogCtl111275 -Node: Inquiry113620 -Node: Navigate117760 -Node: Verify125481 -Node: Restore133901 -Node: Emulation140557 -Node: Scripting147539 -Node: Frontend153101 -Node: Examples154302 -Node: ExDevices155471 -Node: ExCreate156105 -Node: ExDialog157379 -Node: ExGrowing158641 -Node: ExModifying159443 -Node: ExBootable159944 -Node: ExCharset160491 -Node: ExPseudo161319 -Node: ExCdrecord162213 -Node: ExMkisofs162528 -Node: ExGrowisofs163531 -Node: ExException164655 -Node: ExTime165109 -Node: ExIncBackup165568 -Node: ExRestore169040 -Node: ExRecovery170009 -Node: Files170575 -Node: Seealso171613 -Node: Legal172137 -Node: CommandIdx173059 -Node: ConceptIdx186433 +Node: Processing17799 +Node: Dialog21295 +Node: Options22952 +Node: AqDrive24520 +Node: Loading27426 +Node: Insert39605 +Node: SetInsert47962 +Node: Manip56529 +Node: CmdFind65210 +Node: Filter75161 +Node: Writing79510 +Node: SetWrite85799 +Node: Bootable96083 +Node: Charset104035 +Node: Exception106789 +Node: DialogCtl111304 +Node: Inquiry113649 +Node: Navigate117789 +Node: Verify125510 +Node: Restore133930 +Node: Emulation140586 +Node: Scripting148168 +Node: Frontend153730 +Node: Examples154931 +Node: ExDevices156100 +Node: ExCreate156734 +Node: ExDialog158008 +Node: ExGrowing159270 +Node: ExModifying160072 +Node: ExBootable160573 +Node: ExCharset161120 +Node: ExPseudo161948 +Node: ExCdrecord162842 +Node: ExMkisofs163157 +Node: ExGrowisofs164160 +Node: ExException165284 +Node: ExTime165738 +Node: ExIncBackup166197 +Node: ExRestore169669 +Node: ExRecovery170638 +Node: Files171204 +Node: Seealso172242 +Node: Legal172766 +Node: CommandIdx173688 +Node: ConceptIdx187202  End Tag Table diff --git a/xorriso/xorriso.texi b/xorriso/xorriso.texi index af55bbfd..78a3969d 100644 --- a/xorriso/xorriso.texi +++ b/xorriso/xorriso.texi @@ -3813,7 +3813,7 @@ Personality "@strong{mkisofs}" accepts the options listed with: @* -as mkisofs -help @minus{}@minus{} @* -Among them: -R (always on), -r, -J, -o, -M, -C, -dir-mode, +Among them: -R (always on), -r, -J, -o, -M, -C, -dir-mode, -file-mode, -path-list, -m, -exclude-list, -f, -print-size, -pad, -no-pad, -V, -v, -version, -graft-points, -z, -no-emul-boot, -b, -c, -boot-info-table, -boot-load-size, -input-charset, -G, @@ -3874,11 +3874,11 @@ Personalites "@strong{xorrisofs}", "@strong{genisoimage}", and "@strong{genisofs}" are aliases for "mkisofs". @* If xorriso is started with one of the leafnames "xorrisofs", "genisofs", -"mkisofs", or "genisoimage", then it automatically prepends -as "genisofs" -to the command line arguments. I.e. all arguments will be interpreted mkisofs -style until "@minus{}@minus{}" is encountered. -From then on, options are interpreted -as xorriso options. +"mkisofs", or "genisoimage", then it performs -read_mkisofsrc and prepends +-as "genisofs" to the command line arguments. +I.e. all arguments will be interpreted mkisofs style until "@minus{}@minus{}" +is encountered. +From then on, options are interpreted as xorriso options. @* @sp 1 @@ -3926,6 +3926,22 @@ to the command line arguments. I.e. all arguments will be interpreted cdrecord style until "@minus{}@minus{}" is encountered and an eventual commit happens. From then on, options are interpreted as xorriso options. @c man .TP +@item -read_mkisofsrc +@kindex -read_mkisofsrc searches and reads .mkisofsrc file +@cindex Emulation, .mkisofsrc, -read_mkisofsrc +Try one by one to open for reading: + ./.mkisofsrc , $MKISOFSRC , $HOME/.mkisofsrc , $(basename $0)/.mkisofs +@* +On success interpret the file content as of man mkisofs CONFIGURATION, +and end this command. Do not try further files. +The last address is used only if start argument 0 has a non-trivial basename. +@* +The reader currently interprets the following NAME=VALUE pairs: +APPI (-application_id) , PUBL (-publisher) , SYSI (-system_id) , +VOLI (-volid) , VOLS (-volset_id) +@* +Any other lines will be silently ignored. +@c man .TP @item -pacifier behavior_code @kindex -pacifier controls pacifier text form @cindex Emulation, pacifier form, -pacifier @@ -4871,6 +4887,10 @@ to read and execute lines from the following files: @sp 1 The files are read in the sequence given above, but none of them is required to exist. +@* +If mkisofs emulation was enabled by program name "xorrisofs", "mkisofs", +"genisoimage", or "genisofs", then afterwards -read_mkisofsrc is performed, +which reads .mkisofsrc files. See there. @c man .SS @c man .B Runtime control files: @section Runtime control files diff --git a/xorriso/xorriso_private.h b/xorriso/xorriso_private.h index b656fae0..16717771 100644 --- a/xorriso/xorriso_private.h +++ b/xorriso/xorriso_private.h @@ -80,6 +80,9 @@ struct XorrisO { /* the global context of xorriso */ char rc_filenames[Xorriso_rc_nuM][SfileadrL]; int rc_filename_count; + /* Whether .mkisofsrc has already been read */ + int mkisofsrc_done; + char wdi[SfileadrL]; char wdx[SfileadrL]; int did_something_useful; diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 315ab938..b53aa091 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2010.06.25.174329" +#define Xorriso_timestamP "2010.06.25.175810"