New options -C and -M for -as mkisofs

This commit is contained in:
Thomas Schmitt 2008-07-05 18:23:46 +00:00
parent 1aa0f3c568
commit 7081bf395c
4 changed files with 83 additions and 13 deletions

View File

@ -474,6 +474,9 @@ growing will finally end up. It is the responsibility of the user to ensure
this final position and the presence of the older sessions. Else the this final position and the presence of the older sessions. Else the
overall ISO image will not be mountable or will produce read errors when overall ISO image will not be mountable or will produce read errors when
accessing file content. accessing file content.
.br
During a run of blind growing, the input drive gets released before output
begins. The output drive gets released when writing is done.
.TP .TP
\fB\-load\fR entity id \fB\-load\fR entity id
Load a particular (possibly outdated) ISO image from a -dev or -indev which Load a particular (possibly outdated) ISO image from a -dev or -indev which
@ -1746,24 +1749,21 @@ as ISO 9660 image producer and cdrecord as burn program.
xorriso does not strive for their comprehensive emulation. xorriso does not strive for their comprehensive emulation.
Nevertheless it is ready to perform some of its core tasks under control Nevertheless it is ready to perform some of its core tasks under control
of commands which in said programs trigger comparable actions. of commands which in said programs trigger comparable actions.
The scope is for now only a single first data track to be written to blank or
overwriteable media. If possible the media will get closed afterwards.
Multi-session is yet only possible via xorriso's own commands.
.TP .TP
\fB\-as\fR personality option [options] -- \fB\-as\fR personality option [options] --
.br .br
Performs its variable length option list as sparse emulation of the program Performs its variable length option list as sparse emulation of the program
depicted by the personality word. This is only allowed if no image changes depicted by the personality word.
are pending. The input drive is given up.
.br .br
Personality "\fBmkisofs\fR" accepts the options listed with: Personality "\fBmkisofs\fR" accepts the options listed with:
.br .br
-as mkisofs -help -- -as mkisofs -help --
.br .br
Among them: -R (always on), -J, -graft-points, -o, -path-list, -m, -print-size, Among them: -R (always on), -J, -o, -M, -C, -path-list, -m, -exclude-list, -f,
-V, -v, -version, pathspecs as with xorriso -add. A lot of options are not -print-size, -pad, -no-pad, -V, -v, -version, -graft-points,
supported and lead to failure of the mkisofs emulation. Some are ignored, pathspecs as with xorriso -add. 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. but better do not rely on this tolerance.
.br .br
-graft-points is equivalent to -pathspecs on. Note that pathspecs without "=" -graft-points is equivalent to -pathspecs on. Note that pathspecs without "="
@ -1802,6 +1802,14 @@ It ignores most other options of cdrecord and cdrskin but refuses on
-audio, -scanbus, -multi, -msinfo, --grow_overwriteable_iso, -audio, -scanbus, -multi, -msinfo, --grow_overwriteable_iso,
and on blanking modes unknown to xorriso. and on blanking modes unknown to xorriso.
.br .br
The scope is for now only a single first data track to be written to blank or
overwriteable media. If possible the media will get closed afterwards.
.br
An eventually aquired input drive is given up.
This is only allowed if no image changes are pending.
.br
dev= must be given as xorriso device address. Adresses like 0,0,0 or ATA:1,1,0 dev= must be given as xorriso device address. Adresses like 0,0,0 or ATA:1,1,0
are not supported. are not supported.
.br .br

View File

@ -7455,7 +7455,7 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
int ret, i, k, was_path= 0, was_other_option= 0, mem_graft_points; int ret, i, k, was_path= 0, was_other_option= 0, mem_graft_points;
int do_print_size= 0, idx_offset= 0, fd, idx; int do_print_size= 0, idx_offset= 0, fd, idx;
char sfe[5*SfileadrL], adr[SfileadrL+8], ra_text[80], pathspec[2*SfileadrL]; char sfe[5*SfileadrL], adr[SfileadrL+8], ra_text[80], pathspec[2*SfileadrL];
char *ept, *add_pt, eff_path[SfileadrL]; char *ept, *add_pt, eff_path[SfileadrL], indev[SfileadrL+8], msc[80], *cpt;
/* mkisofs 2.01 options which are not scheduled for implementation, yet */ /* mkisofs 2.01 options which are not scheduled for implementation, yet */
static char ignored_arg0_options[][41]= { static char ignored_arg0_options[][41]= {
@ -7479,12 +7479,15 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
" -graft-points Allow to use graft points for filenames", " -graft-points Allow to use graft points for filenames",
" -help Print option help", " -help Print option help",
" -J, -joliet Generate Joliet directory information", " -J, -joliet Generate Joliet directory information",
" -no-pad Do not pad output",
" -o FILE, -output FILE Set output file name", " -o FILE, -output FILE Set output file name",
" -m GLOBFILE, -exclude GLOBFILE", " -m GLOBFILE, -exclude GLOBFILE",
" Exclude file name", " Exclude file name",
" -exclude-list FILE File with list of file names to exclude", " -exclude-list FILE File with list of file names to exclude",
" -pad Pad output by 300k (default)", " -pad Pad output by 300k (default)",
" -no-pad Do not pad output",
" -M FILE, -prev-session FILE Set path to previous session to merge",
" -C PARAMS, -cdrecord-params PARAMS",
" Magic paramters from cdrecord",
" -path-list FILE File with list of pathnames to process", " -path-list FILE File with list of pathnames to process",
" -print-size Print estimated filesystem size and exit", " -print-size Print estimated filesystem size and exit",
" -quiet Run quietly", " -quiet Run quietly",
@ -7497,13 +7500,16 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
strcpy(ra_text, xorriso->report_about_text); strcpy(ra_text, xorriso->report_about_text);
#ifdef NIX
/* <<< MULTI : */
if(xorriso->in_drive_handle != NULL) { if(xorriso->in_drive_handle != NULL) {
ret= Xorriso_option_dev(xorriso, "", 1); /* give up indev */ ret= Xorriso_option_dev(xorriso, "", 1); /* give up indev */
if(ret!=1) if(ret!=1)
return(ret); return(ret);
} }
#endif
adr[0]= 0; adr[0]= indev[0]= 0;
for(i= 0; i<argc; i++) { for(i= 0; i<argc; i++) {
if(strcmp(argv[i], "-version")==0) { if(strcmp(argv[i], "-version")==0) {
sprintf(xorriso->result_line, sprintf(xorriso->result_line,
@ -7525,6 +7531,26 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
strcpy(adr, "stdio:"); strcpy(adr, "stdio:");
if(Sfile_str(adr+strlen(adr), argv[i], 0)<=0) if(Sfile_str(adr+strlen(adr), argv[i], 0)<=0)
{ret= -1; goto ex;} {ret= -1; goto ex;}
} else if(strcmp(argv[i], "-M")==0 || strcmp(argv[i], "-dev")==0 ||
strcmp(argv[i], "-prev-session")==0) {
if(i+1>=argc)
goto not_enough_args;
i++;
indev[0]= 0;
/* >>> MULTI :
check whether indev is a valid MMC drive. Else : */
strcpy(indev, "stdio:");
if(Sfile_str(indev+strlen(indev), argv[i], 0)<=0)
{ret= -1; goto ex;}
} else if(strcmp(argv[i], "-C")==0 ||
strcmp(argv[i], "-cdrecord-params")==0) {
if(i+1>=argc)
goto not_enough_args;
i++;
strncpy(msc, argv[i], sizeof(msc)-1);
msc[sizeof(msc)-1]= 0;
} else if(strcmp(argv[i], "-help")==0) { } else if(strcmp(argv[i], "-help")==0) {
Xorriso_option_report_about(xorriso, "NOTE", 0); Xorriso_option_report_about(xorriso, "NOTE", 0);
for(i= 0; strcmp(helptext[i], "@End_of_helptexT@")!=0; i++) { for(i= 0; strcmp(helptext[i], "@End_of_helptexT@")!=0; i++) {
@ -7570,6 +7596,32 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
return(ret); return(ret);
} }
if(msc[0]) {
cpt= strchr(msc, ',');
if(cpt==NULL) {
illegal_c:;
sprintf(xorriso->info_text,
"-as %s: unusable parameter with option -C: %s",
whom, Text_shellsafe(msc, sfe, 0));
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;}
} else if(cpt==msc || msc[1]==0)
goto illegal_c;
strncpy(sfe, msc, cpt-msc);
sfe[cpt-msc]= 0;
ret= Xorriso_option_load(xorriso, "sbsector", sfe, 0);
if(ret<=0)
return(ret);
ret= Xorriso_option_grow_blindly(xorriso, cpt+1, 0);
if(ret<=0)
return(ret);
}
if(indev[0]) {
ret= Xorriso_option_dev(xorriso, indev, 1);
if(ret<=0)
goto ex;
}
xorriso->padding= 300*1024; xorriso->padding= 300*1024;
for(i= 0; i<argc; i++) { for(i= 0; i<argc; i++) {
@ -7626,6 +7678,12 @@ not_enough_args:;
} else if(strcmp(argv[i], "-o")==0) { } else if(strcmp(argv[i], "-o")==0) {
i++; i++;
/* was already handled in first argument scan */; /* was already handled in first argument scan */;
} else if(strcmp(argv[i], "-M")==0 || strcmp(argv[i], "-dev")==0) {
i++;
/* was already handled in first argument scan */;
} else if(strcmp(argv[i], "-C")==0) {
i++;
/* was already handled in first argument scan */;
} else if(strcmp(argv[i], "-help")==0) { } else if(strcmp(argv[i], "-help")==0) {
/* was already handled in first argument scan */; /* was already handled in first argument scan */;
} else if(strcmp(argv[i], "-V")==0 || strcmp(argv[i], "-volid")==0) { } else if(strcmp(argv[i], "-V")==0 || strcmp(argv[i], "-volid")==0) {
@ -10019,7 +10077,8 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
" Copy ISO file content into a byte interval of a disk file.", " Copy ISO file content into a byte interval of a disk file.",
"", "",
"Compatibility emulation (argument list may be ended by --):", "Compatibility emulation (argument list may be ended by --):",
" -as mkisofs [-help|-o|-R|-J|-V|-P|-f|-m|-graft-points|-path-list|pathspecs]", " -as mkisofs [-help|-version|-o|-R|-J|-V|-P|-f|-m|-exclude-list|-no-pad|",
" -M|-C|-graft-points|-path-list|pathspecs]",
" 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.",
" -as cdrecord [-help|-v|dev=|speed=|blank=|fs=|-eject|-atip|padsize=|path|-]", " -as cdrecord [-help|-v|dev=|speed=|blank=|fs=|-eject|-atip|padsize=|path|-]",

View File

@ -315,6 +315,9 @@ int Xorriso_option_fs(struct XorrisO *xorriso, char *size, int flag);
/* Option -gid */ /* Option -gid */
int Xorriso_option_gid(struct XorrisO *xorriso, char *gid, int flag); int Xorriso_option_gid(struct XorrisO *xorriso, char *gid, int flag);
/* Option -grow_blindly */
int Xorriso_option_grow_blindly(struct XorrisO *xorriso, char *msc2, int flag);
/* Option -help and part of -prog_help */ /* Option -help and part of -prog_help */
int Xorriso_option_help(struct XorrisO *xorriso, int flag); int Xorriso_option_help(struct XorrisO *xorriso, int flag);

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.07.05.180241" #define Xorriso_timestamP "2008.07.05.182424"