New option -read_mkisofsrc interprets .mkisofsrc

This commit is contained in:
Thomas Schmitt 2010-06-25 17:59:01 +00:00
parent 6ab8ffc137
commit 10233adb87
12 changed files with 298 additions and 76 deletions

View File

@ -95,6 +95,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
for(i=0;i<m->rc_filename_count-1;i++) for(i=0;i<m->rc_filename_count-1;i++)
strcpy(m->rc_filenames[i],Xorriso_sys_rc_nameS[i]); strcpy(m->rc_filenames[i],Xorriso_sys_rc_nameS[i]);
m->rc_filenames[m->rc_filename_count-1][0]= 0; m->rc_filenames[m->rc_filename_count-1][0]= 0;
m->mkisofsrc_done= 0;
m->wdi[0]= 0; m->wdi[0]= 0;
strcpy(m->wdx, m->initial_wdx); strcpy(m->wdx, m->initial_wdx);

View File

@ -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]", " -no-emul-boot|-b|-c|-boot-info-table|-boot-load-size|-G]",
" Perform some mkisofs gestures, understand pathspecs as mkisofs", " Perform some mkisofs gestures, understand pathspecs as mkisofs",
" does. Commit happens outside emulation at usual occasions.", " 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]", " -as cdrecord [-help|-v|dev=|speed=|blank=|fs=|-eject|-atip|padsize=|-multi]",
" path|-", " path|-",
" Perform some cdrecord gestures, eventually write at most one", " Perform some cdrecord gestures, eventually write at most one",

View File

@ -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" */ /* Option -reassure "on"|"tree"|"off" */
int Xorriso_option_reassure(struct XorrisO *xorriso, char *mode, int flag) 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 */ /* Option -volid */
/* @param flag bit0= do not warn of problematic volid
*/
int Xorriso_option_volid(struct XorrisO *xorriso, char *volid, int flag) int Xorriso_option_volid(struct XorrisO *xorriso, char *volid, int flag)
{ {
int warn_shell= 0, warn_ecma= 0, i, ret; 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); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0); return(0);
} }
if(warn_shell) { if(warn_shell && !(flag & 1)) {
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"-volid text problematic as automatic mount point name"); "-volid text problematic as automatic mount point name");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0); 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, sprintf(xorriso->info_text,
"-volid text is too long for Joliet (%d > 16)",(int) strlen(volid)); "-volid text is too long for Joliet (%d > 16)",(int) strlen(volid));
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);
} }
if(warn_ecma) { if(warn_ecma && !(flag & 1)) {
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"-volid text does not comply to ISO 9660 / ECMA 119 rules"); "-volid text does not comply to ISO 9660 / ECMA 119 rules");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0);

View File

@ -449,7 +449,8 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv,
"ban_stdio_write","close_filter_list","commit","devices","end", "ban_stdio_write","close_filter_list","commit","devices","end",
"for_backup", "help", "for_backup", "help",
"list_formats","no_rc","print_size","pvd_info","pwd","pwdi","pwdx", "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]= { static char arg1_commands[][40]= {
@ -1136,6 +1137,9 @@ next_command:;
(*idx)++; (*idx)++;
ret= Xorriso_option_path_list(xorriso, arg1, 1); 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) { } else if(strcmp(cmd,"reassure")==0) {
(*idx)++; (*idx)++;
ret= Xorriso_option_reassure(xorriso, arg1, 0); 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 Xorriso_read_rc(struct XorrisO *xorriso, int flag)
{ {
int ret,i,was_failure= 0,fret; int ret,i,was_failure= 0,fret;
@ -1618,6 +1760,11 @@ int Xorriso_read_rc(struct XorrisO *xorriso, int flag)
continue; continue;
return(ret); 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); return(!was_failure);
} }

View File

@ -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, int Xorriso_normalize_acl_text(struct XorrisO *xorriso, char *in_text,
char **access_acl_text, char **default_acl_text, int flag); char **access_acl_text, char **default_acl_text, int flag);
int Xorriso_read_mkisofsrc(struct XorrisO *xorriso, int flag);
#endif /* ! Xorriso_pvt_cmd_includeD */ #endif /* ! Xorriso_pvt_cmd_includeD */

View File

@ -28,7 +28,7 @@
#include "sfile.h" #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) char *Sfile_fgets_n(char *line, int maxl, FILE *fp, int flag)
{ {

View File

@ -9,7 +9,7 @@
.\" First parameter, NAME, should be all caps .\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1) .\" 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. .\" Please adjust this date whenever revising the manpage.
.\" .\"
.\" Some roff macros, for reference: .\" 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 CDROM booting. The new MBR of a follow-up session can get in effect
only on overwriteable media. only on overwriteable media.
.br .br
Emulation -as mkisofs supports the example options out of the ISOLINUX wiki. Emulation -as mkisofs supports the example options out of the ISOLINUX wiki,
It also supports the options used in GRUB script grub-mkrescue. the options used in GRUB script grub-mkrescue, and the example in the
FreeBSD AvgLiveCD wiki.
.br .br
The support for other boot image types is sparse. The support for other boot image types is sparse.
.br .br
@ -3184,7 +3185,8 @@ Personality "\fBmkisofs\fR" accepts the options listed with:
.br .br
-as mkisofs -help -- -as mkisofs -help --
.br .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, -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, -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, -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. style until "--" is encountered and an eventual commit happens.
From then on, options are interpreted as xorriso options. From then on, options are interpreted as xorriso options.
.TP .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 \fB\-pacifier\fR behavior_code
Control behavior of UPDATE pacifiers during write operations. Control behavior of UPDATE pacifiers during write operations.
The following behavior codes are defined: The following behavior codes are defined:

View File

@ -1015,6 +1015,9 @@ int Xorriso_option_pwdi(struct XorrisO *xorriso, int flag);
/* Option -pwdx */ /* Option -pwdx */
int Xorriso_option_pwdx(struct XorrisO *xorriso, int flag); 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" */ /* Option -reassure "on"|"tree"|"off" */
int Xorriso_option_reassure(struct XorrisO *xorriso, char *mode, int flag); 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); int Xorriso_option_version(struct XorrisO *xorriso, int flag);
/* Option -volid */ /* Option -volid */
/* @param flag bit0= do not warn of problematic volid
*/
int Xorriso_option_volid(struct XorrisO *xorriso, char *volid, int flag); int Xorriso_option_volid(struct XorrisO *xorriso, char *volid, int flag);
/* Option -volset_id */ /* Option -volset_id */

View File

@ -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 partition table. It does not hamper CDROM booting. The new MBR of a
follow-up session can get in effect only on overwriteable media. follow-up session can get in effect only on overwriteable media.
Emulation -as mkisofs supports the example options out of the ISOLINUX 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. The support for other boot image types is sparse.
*ACL* are an advanced way of controlling access permissions to file *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: Personality "*mkisofs*" accepts the options listed with:
-as mkisofs -help -- -as mkisofs -help --
Among them: -R (always on), -r, -J, -o, -M, -C, -path-list, -m, Among them: -R (always on), -r, -J, -o, -M, -C, -dir-mode,
-exclude-list, -f, -print-size, -pad, -no-pad, -V, -v, -version, -file-mode, -path-list, -m, -exclude-list, -f, -print-size, -pad,
-graft-points, -z, -no-emul-boot, -b, -c, -boot-info-table, -no-pad, -V, -v, -version, -graft-points, -z, -no-emul-boot, -b,
-boot-load-size, -input-charset, -G, -output-charset, -U, -hide, -c, -boot-info-table, -boot-load-size, -input-charset, -G,
-hide-joliet, -hide-list, -hide-joliet-list, file paths and -output-charset, -U, -hide, -hide-joliet, -hide-list,
pathspecs. A lot of options are not supported and lead to failure -hide-joliet-list, file paths and pathspecs. A lot of options are
of the mkisofs emulation. Some are ignored, but better do not rely not supported and lead to failure of the mkisofs emulation. Some
on this tolerance. are ignored, but better do not rely on this tolerance.
-graft-points is equivalent to -pathspecs on. Note that pathspecs -graft-points is equivalent to -pathspecs on. Note that pathspecs
without "=" are interpreted differently than with xorriso option without "=" are interpreted differently than with xorriso option
-add. Directories get merged with the root directory of the ISO -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 an eventual commit happens. From then on, options are interpreted
as xorriso options. 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 -pacifier behavior_code
Control behavior of UPDATE pacifiers during write operations. The Control behavior of UPDATE pacifiers during write operations. The
following behavior codes are defined: 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) * -out_charset sets output character set: SetWrite. (line 122)
* -outdev aquires a drive for output: AqDrive. (line 29) * -outdev aquires a drive for output: AqDrive. (line 29)
* -overwrite enables overwriting in ISO: SetInsert. (line 127) * -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) * -padding sets amount of image padding: SetWrite. (line 205)
* -page set terminal geometry: DialogCtl. (line 15) * -page set terminal geometry: DialogCtl. (line 15)
* -paste_in copies file into disk file: Restore. (line 117) * -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) * -pwdx tells working directory on disk: Navigate. (line 23)
* -quoted_not_list sets exclusions: SetInsert. (line 72) * -quoted_not_list sets exclusions: SetInsert. (line 72)
* -quoted_path_list inserts paths from disk file: Insert. (line 80) * -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) * -reassure enables confirmation question: DialogCtl. (line 28)
* -report_about controls verbosity: Exception. (line 55) * -report_about controls verbosity: Exception. (line 55)
* -return_with controls exit value: Exception. (line 39) * -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 discards pending changes: Writing. (line 9)
* -rollback_end ends program without writing: Scripting. (line 125) * -rollback_end ends program without writing: Scripting. (line 125)
* -rom_toc_scan searches for sessions: Loading. (line 184) * -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) * -scsi_log reports SCSI commands: Scripting. (line 113)
* -session_log logs written sessions: Scripting. (line 104) * -session_log logs written sessions: Scripting. (line 104)
* -session_string composes session info line: Inquiry. (line 56) * -session_string composes session info line: Inquiry. (line 56)
@ -3867,7 +3882,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
[index] [index]
* Menu: * Menu:
* ACL, _definiton: Extras. (line 36) * ACL, _definiton: Extras. (line 37)
* ACL, control handling, -acl: Loading. (line 123) * ACL, control handling, -acl: Loading. (line 123)
* ACL, set in ISO image, -setfacl: Manip. (line 73) * ACL, set in ISO image, -setfacl: Manip. (line 73)
* ACL, set in ISO image, -setfacl_list: Manip. (line 100) * 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) * Backslash Interpretation, _definition: Processing. (line 49)
* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 163) * Backup, enable fast incremental, -disk_dev_ino: Loading. (line 163)
* Backup, enable features, -for_backup: Loading. (line 158) * 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) * Blank media, _definition: Media. (line 25)
* Blind growing, _definition: Methods. (line 40) * Blind growing, _definition: Methods. (line 40)
* Bootability, control, -boot_image: Bootable. (line 20) * 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) * Drive, write and eject, -commit_eject: Writing. (line 40)
* El Torito, _definiton: Extras. (line 19) * El Torito, _definiton: Extras. (line 19)
* Emulation, -as: Emulation. (line 13) * Emulation, -as: Emulation. (line 13)
* Emulation, .mkisofsrc, -read_mkisofsrc: Emulation. (line 107)
* Emulation, cdrecord, -as: Emulation. (line 74) * Emulation, cdrecord, -as: Emulation. (line 74)
* Emulation, mkisofs, -as: Emulation. (line 16) * Emulation, mkisofs, -as: Emulation. (line 16)
* Emulation, pacifier form, -pacifier: Emulation. (line 107) * Emulation, pacifier form, -pacifier: Emulation. (line 119)
* Examples: Examples. (line 6) * Examples: Examples. (line 6)
* Filter, _definition: Filter. (line 6) * Filter, _definition: Filter. (line 6)
* Filter, apply to file tree, -set_filter_r: Filter. (line 84) * 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, predict image size, -print_size: Inquiry. (line 69)
* Write, set speed, -speed: SetWrite. (line 148) * Write, set speed, -speed: SetWrite. (line 148)
* Write, simulation, -dummy: SetWrite. (line 188) * Write, simulation, -dummy: SetWrite. (line 188)
* xattr, _definiton: Extras. (line 50) * xattr, _definiton: Extras. (line 51)
* xattr, control handling, -xattr: Loading. (line 131) * xattr, control handling, -xattr: Loading. (line 131)
* xattr, set in ISO image, -setfattr: Manip. (line 110) * xattr, set in ISO image, -setfattr: Manip. (line 110)
* xattr, set in ISO image, -setfattr_list: Manip. (line 126) * xattr, set in ISO image, -setfattr_list: Manip. (line 126)
@ -4100,50 +4116,50 @@ Node: Media6089
Node: Methods8519 Node: Methods8519
Node: Drives11066 Node: Drives11066
Node: Extras14372 Node: Extras14372
Node: Processing17770 Node: Processing17799
Node: Dialog21266 Node: Dialog21295
Node: Options22923 Node: Options22952
Node: AqDrive24491 Node: AqDrive24520
Node: Loading27397 Node: Loading27426
Node: Insert39576 Node: Insert39605
Node: SetInsert47933 Node: SetInsert47962
Node: Manip56500 Node: Manip56529
Node: CmdFind65181 Node: CmdFind65210
Node: Filter75132 Node: Filter75161
Node: Writing79481 Node: Writing79510
Node: SetWrite85770 Node: SetWrite85799
Node: Bootable96054 Node: Bootable96083
Node: Charset104006 Node: Charset104035
Node: Exception106760 Node: Exception106789
Node: DialogCtl111275 Node: DialogCtl111304
Node: Inquiry113620 Node: Inquiry113649
Node: Navigate117760 Node: Navigate117789
Node: Verify125481 Node: Verify125510
Node: Restore133901 Node: Restore133930
Node: Emulation140557 Node: Emulation140586
Node: Scripting147539 Node: Scripting148168
Node: Frontend153101 Node: Frontend153730
Node: Examples154302 Node: Examples154931
Node: ExDevices155471 Node: ExDevices156100
Node: ExCreate156105 Node: ExCreate156734
Node: ExDialog157379 Node: ExDialog158008
Node: ExGrowing158641 Node: ExGrowing159270
Node: ExModifying159443 Node: ExModifying160072
Node: ExBootable159944 Node: ExBootable160573
Node: ExCharset160491 Node: ExCharset161120
Node: ExPseudo161319 Node: ExPseudo161948
Node: ExCdrecord162213 Node: ExCdrecord162842
Node: ExMkisofs162528 Node: ExMkisofs163157
Node: ExGrowisofs163531 Node: ExGrowisofs164160
Node: ExException164655 Node: ExException165284
Node: ExTime165109 Node: ExTime165738
Node: ExIncBackup165568 Node: ExIncBackup166197
Node: ExRestore169040 Node: ExRestore169669
Node: ExRecovery170009 Node: ExRecovery170638
Node: Files170575 Node: Files171204
Node: Seealso171613 Node: Seealso172242
Node: Legal172137 Node: Legal172766
Node: CommandIdx173059 Node: CommandIdx173688
Node: ConceptIdx186433 Node: ConceptIdx187202
 
End Tag Table End Tag Table

View File

@ -3813,7 +3813,7 @@ Personality "@strong{mkisofs}" accepts the options listed with:
@* @*
-as mkisofs -help @minus{}@minus{} -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, -path-list, -m, -exclude-list,
-f, -print-size, -pad, -no-pad, -V, -v, -version, -graft-points, -z, -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, -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". and "@strong{genisofs}" are aliases for "mkisofs".
@* @*
If xorriso is started with one of the leafnames "xorrisofs", "genisofs", If xorriso is started with one of the leafnames "xorrisofs", "genisofs",
"mkisofs", or "genisoimage", then it automatically prepends -as "genisofs" "mkisofs", or "genisoimage", then it performs -read_mkisofsrc and prepends
to the command line arguments. I.e. all arguments will be interpreted mkisofs -as "genisofs" to the command line arguments.
style until "@minus{}@minus{}" is encountered. I.e. all arguments will be interpreted mkisofs style until "@minus{}@minus{}"
From then on, options are interpreted is encountered.
as xorriso options. From then on, options are interpreted as xorriso options.
@* @*
@sp 1 @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. style until "@minus{}@minus{}" is encountered and an eventual commit happens.
From then on, options are interpreted as xorriso options. From then on, options are interpreted as xorriso options.
@c man .TP @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 @item -pacifier behavior_code
@kindex -pacifier controls pacifier text form @kindex -pacifier controls pacifier text form
@cindex Emulation, pacifier form, -pacifier @cindex Emulation, pacifier form, -pacifier
@ -4871,6 +4887,10 @@ to read and execute lines from the following files:
@sp 1 @sp 1
The files are read in the sequence given above, but none of them is required The files are read in the sequence given above, but none of them is required
to exist. 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 .SS
@c man .B Runtime control files: @c man .B Runtime control files:
@section Runtime control files @section Runtime control files

View File

@ -80,6 +80,9 @@ struct XorrisO { /* the global context of xorriso */
char rc_filenames[Xorriso_rc_nuM][SfileadrL]; char rc_filenames[Xorriso_rc_nuM][SfileadrL];
int rc_filename_count; int rc_filename_count;
/* Whether .mkisofsrc has already been read */
int mkisofsrc_done;
char wdi[SfileadrL]; char wdi[SfileadrL];
char wdx[SfileadrL]; char wdx[SfileadrL];
int did_something_useful; int did_something_useful;

View File

@ -1 +1 @@
#define Xorriso_timestamP "2010.06.25.174329" #define Xorriso_timestamP "2010.06.25.175810"