New commands -x, -list_arg_sorting

This commit is contained in:
Thomas Schmitt 2012-01-31 13:04:28 +00:00
parent 55709b42e5
commit f848062bf7
12 changed files with 540 additions and 87 deletions

View File

@ -185,6 +185,7 @@ Xorriso_option_history;
Xorriso_option_iso_rr_pattern;
Xorriso_option_jigdo;
Xorriso_option_joliet;
Xorriso_option_list_arg_sorting;
Xorriso_option_list_delimiter;
Xorriso_option_list_extras;
Xorriso_option_list_formats;

View File

@ -3,7 +3,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2011 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2012 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -122,6 +122,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
for(i=0;i<m->rc_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->arrange_args= 0;
m->mkisofsrc_done= 0;
m->wdi[0]= 0;

View File

@ -1423,6 +1423,11 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
"images with Rock Ridge extensions. Write targets can be drives with optical",
"media or local filesystem objects.",
"",
" -x Only in effect if given as program argument:",
" Execute commands given as program arguments in a sequence",
" that most likely makes some sense. Default is to execute",
" program arguments exactly in the sequence as given.",
"",
"Preparation options:",
"Drive addresses are either /dev/... as listed with option -devices or",
"disk files, eventually with prefix \"stdio:\" if non-CD-drive in /dev tree.",
@ -2006,6 +2011,8 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
" Tell whether certain extra features were enabled at compile",
" time. Code \"all\" lists all features and a headline. Other",
" codes pick a single feature. \"codes\" lists the known codes.",
" -list_arg_sorting",
" Print the sorting order of xorriso commands with option -x.",
" -version Tell program and version number",
" -end End program. Commit eventual pending changes.",
" -rollback_end",

View File

@ -74,6 +74,16 @@ int Xorriso_option_joliet(struct XorrisO *xorriso, char *mode, int flag)
}
/* Option -list_arg_sorting */
int Xorriso_option_list_arg_sorting(struct XorrisO *xorriso, int flag)
{
int ret;
ret= Xorriso_cmd_sorting_rank(xorriso, 0, NULL, 0, 1);
return(ret);
}
/* Option -list_delimiter */
int Xorriso_option_list_delimiter(struct XorrisO *xorriso, char *text,
int flag)

View File

@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2011 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2012 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -450,7 +450,7 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv,
"ban_stdio_write","close_filter_list","commit",
"device_links","devices","end",
"for_backup", "help",
"list_formats","list_speeds",
"list_arg_sorting","list_formats","list_speeds",
"no_rc","print_size","pvd_info","pwd","pwdi","pwdx",
"read_mkisofsrc","rollback","rollback_end",
"tell_media_space","toc","version",
@ -571,9 +571,278 @@ ex:
}
/* @param flag bit0= list sorting order rather than looking for argv[idx]
*/
int Xorriso_cmd_sorting_rank(struct XorrisO *xorriso,
int argc, char **argv, int idx, int flag)
{
int ret, i, cmd_data_size= 2 * SfileadrL;
char *cmd, *cmd_data= NULL;
static char *commands[]= {
"* Execution order of program arguments with option -x:",
"x",
"* Support for frontend programs via stdin and stdout (1):",
"prog", "prog_help",
"* Exception processing:",
"abort_on", "return_with", "report_about", "signal_handling",
"error_behavior",
"* Scripting, dialog and program control features (1):",
"no_rc", "help", "version", "list_extras", "list_arg_sorting",
"temp_mem_limit", "backslash_codes",
"errfile_log", "session_log", "scsi_log",
"options_from_file", "list_delimiter",
"print", "print_info", "print_mark", "prompt", "sleep",
"* Drive and media related inquiry actions (1):",
"devices", "device_links",
"mount_opts", "mount_cmd", "session_string",
"* Influencing the behavior of image loading:",
"load", "displacement", "drive_class", "assert_volid", "in_charset",
"auto_charset", "hardlinks", "acl", "xattr", "md5", "for_backup",
"disk_dev_ino", "rom_toc_scan", "calm_drive", "ban_stdio_write",
"early_stdio_test",
"* Character sets:",
"charset", "local_charset",
"* Aquiring source and target drive:",
"dev", "indev", "outdev",
"* Drive and media related inquiry actions (2):",
"list_profiles", "list_formats", "list_speeds",
"toc", "pvd_info",
"* Settings for file insertion:",
"file_size_limit", "not_mgt", "not_paths", "not_leaf", "not_list",
"quoted_not_list", "follow", "pathspecs", "overwrite", "split_size",
"* Navigation in ISO image and disk filesystem (1):",
"cd", "cdx", "pwd", "pwdx",
"* Inserting files into ISO image:",
"disk_pattern", "add_plainly",
"mkdir", "add", "path_list", "quoted_path_list",
"map", "map_single", "map_l", "update", "update_r", "update_l",
"cut_out", "cpr",
"clone", "cp_clone",
"* Navigation in ISO image and disk filesystem (2):",
"ls", "lsd", "lsl", "lsdl", "lsx", "lsdx", "lslx", "lsdlx",
"getfacl", "getfacl_r", "getfattr", "getfattr_r", "du", "dus",
"dux", "dusx", "findx",
"compare", "compare_r", "compare_l", "show_stream", "show_stream_r",
"* File manipulations:",
"iso_rr_pattern",
"rm", "rm_r", "rmdir", "mv",
"chown", "chown_r", "chgrp", "chgrp_r", "chmod", "chmod_r", "setfacl",
"setfacl_r", "setfacl_list", "setfattr", "setfattr_r", "setfattr_list",
"alter_date", "alter_date_r", "hide",
"* Filters for data file content:",
"external_filter", "unregister_filter", "close_filter_list",
"set_filter", "set_filter_r",
"* Tree traversal command -find:",
"find",
"* osirrox ISO-to-disk restore options:",
"osirrox", "extract", "extract_single", "extract_l", "extract_cut",
"cpx", "cpax", "cp_rx", "cp_rax", "paste_in",
"mount",
"* Settings for result writing:",
"joliet", "compliance", "volid", "volset_id", "publisher",
"application_id", "system_id", "volume_date", "copyright_file",
"abstract_file", "biblio_file", "preparer_id", "out_charset",
"read_mkisofsrc",
"uid", "gid", "zisofs", "speed", "stream_recording", "dvd_obs",
"stdio_sync", "dummy", "fs", "close", "padding",
"grow_blindly", "pacifier", "scdbackup_tag",
"* Bootable ISO images:",
"boot_image", "append_partition",
"* Jigdo Template Extraction:",
"jigdo",
"* Command compatibility emulations:",
"as",
"* Scripting, dialog and program control features (2):",
"history", "status_history_max", "status",
"* Drive and media related inquiry actions (3):",
"print_size", "tell_media_space",
"* Writing the result, drive control:",
"format", "blank", "close_damaged",
"rollback", "commit", "commit_eject",
"eject",
"* Evaluation of readability and recovery:",
"check_media_defaults", "check_media", "check_md5", "check_md5_r",
"* Support for frontend programs via stdin and stdout (2):",
"pkt_output", "logfile", "mark",
"* Dialog mode control:",
"dialog", "page", "use_readline", "reassure",
"* Scripting, dialog and program control features (3):",
"rollback_end", "end",
""
};
if(flag & 1) {
for(i= 0; commands[i][0] !=0; i++) {
if(commands[i][0] == '*')
sprintf(xorriso->result_line, "#%s\n", commands[i] + 1);
else
sprintf(xorriso->result_line, "-%s\n", commands[i]);
Xorriso_result(xorriso, 0);
}
ret= 1; goto ex;
}
if(argc <= 0)
{ret= -1; goto ex;}
Xorriso_alloc_meM(cmd_data, char, cmd_data_size);
ret= Xorriso_normalize_command(xorriso, argv[idx], -1,
cmd_data, cmd_data_size, &cmd, 0);
if(ret < 0)
goto ex;
if(cmd[0] == '#' || cmd[0] == 0 ||
strcmp(cmd, xorriso->list_delimiter) == 0) {
/* Move to end: comment line , empty option , orphaned list delimiter */
ret= 0x7fffffff; goto ex;
}
for(i= 0; commands[i][0] !=0; i++) {
if(commands[i][0] == '*') /* headline in command list */
continue;
if(strcmp(commands[i], cmd) != 0)
continue;
ret= i + 1; goto ex;
}
ret= 1;
ex:
Xorriso_free_meM(cmd_data);
return(ret);
}
int Xorriso__cmp_cmd_rank(const void *a, const void *b)
{
int ra, rb;
ra= ((int *) a)[1];
rb= ((int *) b)[1];
if(ra < rb)
return(-1);
if(ra > rb)
return(1);
ra= ((int *) a)[2];
rb= ((int *) b)[2];
if(ra < rb)
return(-1);
if(ra > rb)
return(1);
return(0);
}
/* @param flag bit0= print command sequence rather than executing it
bit1= these are command line arguments
(for xorriso->argument_emulation)
*/
int Xorriso_exec_args_sorted(struct XorrisO *xorriso,
int argc, char **argv, int *idx, int flag)
{
int cmd_count= 0, ret, i, arg_count, *idx_rank= NULL, cmd_idx;
/* Count commands and allocate index-rank array */
for(i= *idx; i < argc; i++) {
ret= Xorriso_count_args(xorriso, argc - i, argv + i, &arg_count, 1);
if(ret <= 0)
goto ex;
if(ret != 1)
continue;
cmd_count++;
i+= arg_count;
}
if(cmd_count <= 0)
{ret= 1; goto ex;}
Xorriso_alloc_meM(idx_rank, int, 3 * cmd_count);
/* Fill index-rank array and sort */
cmd_count= 0;
for(i= *idx; i < argc; i++) {
ret= Xorriso_count_args(xorriso, argc - i, argv + i, &arg_count, 1);
if(ret <= 0)
goto ex;
if(ret != 1)
continue;
idx_rank[3 * cmd_count]= i;
ret= Xorriso_cmd_sorting_rank(xorriso, argc, argv, i, 0);
if(ret < 0)
goto ex;
idx_rank[3 * cmd_count + 1]= ret;
idx_rank[3 * cmd_count + 2]= cmd_count;
cmd_count++;
i+= arg_count;
}
qsort(idx_rank, cmd_count, 3 * sizeof(int), Xorriso__cmp_cmd_rank);
/* Execute or print indice from index-rank array */
if(flag & 1) {
sprintf(xorriso->result_line,
"Automatically determined command sequence:\n");
Xorriso_result(xorriso, 0);
xorriso->result_line[0]= 0;
}
for(i= 0; i < cmd_count; i++) {
cmd_idx= idx_rank[3 * i];
if(flag & 1) {
if(strlen(xorriso->result_line) + 1 + strlen(argv[cmd_idx]) > 78) {
strcat(xorriso->result_line, "\n");
Xorriso_result(xorriso, 0);
xorriso->result_line[0]= 0;
}
sprintf(xorriso->result_line + strlen(xorriso->result_line),
" %s", argv[cmd_idx]);
} else {
ret= Xorriso_interpreter(xorriso, argc, argv, &cmd_idx, 4 | (flag & 2));
if(ret <= 0 || ret == 3)
goto ex;
}
}
if(flag & 1) {
if(strlen(xorriso->result_line) > 0) {
strcat(xorriso->result_line, "\n");
Xorriso_result(xorriso, 0);
}
} else
*idx= argc;
ret= 1;
ex:
Xorriso_free_meM(idx_rank);
return(ret);
}
/* @param flag bit0= recursion
bit1= these are command line arguments
(for xorriso->argument_emulation)
bit2= Only execute the one command argv[*idx] and advance
*idx to the next command if sucessful. Then return.
*/
int Xorriso_interpreter(struct XorrisO *xorriso,
int argc, char **argv, int *idx, int flag)
@ -610,6 +879,10 @@ next_command:;
if((*idx)>=argc)
{ret= 1; goto ex;}
}
if((xorriso->arrange_args || (flag & 8)) && !(flag & (4 | 16))) {
ret= Xorriso_exec_args_sorted(xorriso, argc, argv, idx, 0);
goto ex;
}
}
ret= Xorriso_count_args(xorriso, argc - *idx, argv + *idx, &arg_count, 1);
@ -1019,6 +1292,9 @@ next_command:;
(*idx)++;
ret= Xorriso_option_joliet(xorriso, arg1, 0);
} else if(strcmp(cmd, "list_arg_sorting") == 0) {
ret= Xorriso_option_list_arg_sorting(xorriso, 0);
} else if(strcmp(cmd, "list_delimiter") == 0) {
(*idx)++;
ret= Xorriso_option_list_delimiter(xorriso, arg1, 0);
@ -1423,6 +1699,9 @@ next_command:;
(*idx)+= 2;
ret= Xorriso_option_volume_date(xorriso, arg1, arg2, 0);
} else if(strcmp(cmd, "x") == 0) {
/* only in effect in Xorriso_prescan_args() */;
} else if(strcmp(cmd,"xattr")==0) {
(*idx)++;
ret= Xorriso_option_xattr(xorriso, arg1, 0);
@ -1459,7 +1738,7 @@ eval_any_problems:
if(ret<0)
goto ex;
if(*idx<argc)
if(*idx < argc && !(flag & 4))
goto next_command;
ex:;
@ -1589,6 +1868,7 @@ int Xorriso_prescan_args(struct XorrisO *xorriso, int argc, char **argv,
int flag)
/*
bit0= do not interpret argv[1]
bit1= complain about inknown arguments
*/
/*
return:
@ -1750,6 +2030,9 @@ protect_stdout:;
Xorriso_option_signal_handling(xorriso, arg1, 1); /* no install */
was_signal_handling= 1;
} else if(strcmp(original_cmd, "-x") == 0) {
xorriso->arrange_args= 1;
} else {
ret= Xorriso_count_args(xorriso, argc - i, argv + i, &arg_count, 1);
if(ret == 1) {

View File

@ -88,5 +88,10 @@ int Xorriso_normalize_acl_text(struct XorrisO *xorriso, char *in_text,
int Xorriso_read_mkisofsrc(struct XorrisO *xorriso, int flag);
/* @param flag bit0= list sorting order rather than looking for argv[idx]
*/
int Xorriso_cmd_sorting_rank(struct XorrisO *xorriso,
int argc, char **argv, int idx, int flag);
#endif /* ! Xorriso_pvt_cmd_includeD */

View File

@ -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 "Version 1.2.1, Jan 27, 2012"
.TH XORRISO 1 "Version 1.2.1, Jan 31, 2012"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -447,7 +447,10 @@ only on GNU/Linux and FreeBSD, where they are known as extattr.
.B Command processing:
.br
Commands are either actions which happen immediately or settings which
influence following actions. So their sequence does matter.
influence following actions. So their sequence does matter, unless they are
given as program arguments and option
\fB\-x\fR
is among them.
.br
Commands consist of a command word,
followed by zero or more parameter words. If the list of parameter words
@ -566,6 +569,34 @@ the dashes of the emulated options are mandatory.
Normally any number of leading dashes is ignored with command words and
inner dashes are interpreted as underscores.
.TP
.B Execution order of program arguments:
.PP
By default the program arguments of a xorriso run are interpreted as a
sequence of commands which get performed exactly in the given order.
This requires the user to write commands for desired settings before the
commands which shall be influenced by those settings.
.br
Many other programs allow to hand over options as program arguments
in an arbitrary sequence and perform settings and actions in a sequence
of their own discretion. xorriso provides an option to enable such a behavior
at the cost of losing freedom of expression.
.TP
\fB\-x\fR
Enable automatic sorting of program arguments to a sequence that most likely
makes some sense. This command may be given at any position among the commands
which are handed over as program arguments.
.br
It works only if it is given as program argument. I.e. not
in startup files. not with \-options_from_file, not in dialog mode.
.TP
\fB\-list_arg_sorting\fR
List all xorriso commands in the order which applies if option \-x is in effect.
.br
This list may also be helpful without \-x, for a user who ponders over the
sequence in which to put commands. Deviations from the sorting order may
well make sense, though.
.PP
.TP
.B Aquiring source and target drive:
.PP
The effect of aquiring a drive may depend on several options in the

View File

@ -236,6 +236,8 @@ int Xorriso_destroy(struct XorrisO **xorriso, int flag);
get into effect before the libraries get initialized:
-abort_on , -report_about , -return_with , -list_delimiter ,
-scsi_log , -signal_handling
This is the only occasion where command -x has an effect:
-x
Some commands get executed only if they are the only command in argv:
-prog_help , -help
The following is recognized only if it is the first of all arguments:
@ -301,6 +303,12 @@ int Xorriso_program_arg_bsl(struct XorrisO *xorriso, int argc, char ***argv,
perform own error status evaluation. See below: Options API.)
After the first command and its parameters there may be more commands and
parameters. All parameters must be given in the same call as their command.
@since 1.2.2:
Commands may get arranged in a sequence that is most likely to make sense.
E.g. image loading settings before drive aquiration, then commands fori
adding files, then settings for writing, then writing.
This feature may be enabled by command "-x" in Xorriso_prescan_args()
or by parameter flag of this call.
@param xorriso The context object in which to perform the commands.
@param argc Number of arguments.
@param argv The arguments. argv[0] contains the program name.
@ -308,10 +316,24 @@ int Xorriso_program_arg_bsl(struct XorrisO *xorriso, int argc, char ***argv,
@param idx Argument cursor. When this function is called, *idx must
be at least 1, argv[*idx] must be a command.
*idx will iterate over commands and parameters until this
function aborts or until argc is reached.
function aborts, or until argc is reached, or only once if
flag bit2 is set.
@param flag bit0= reserved. Indicates recursion. Submit 0.
bit1= Indicates that these are the main() program start
arguments
arguments. This enables their use with emulations
which where set with Xorriso_new(), or argument
arranging.
bit2= Only execute the one command argv[*idx] and advance
*idx to the next command if sucessful. Then return.
This prevents any argument arranging.
@since 1.2.2
bit3= With bit1 and not bit2:
Enable argument arranging as with
Xorriso_prescan_args() and command "-x".
@since 1.2.2
bit4= With bit1:
Surely disable argument arranging.
@since 1.2.2
@return <=0 = error
1 = success
2 = problem event ignored
@ -918,11 +940,16 @@ int Xorriso_option_jigdo(struct XorrisO *xorriso, char *aspect, char *arg,
/* Option -joliet "on"|"off" */
int Xorriso_option_joliet(struct XorrisO *xorriso, char *mode, int flag);
/* Option -list_arg_sorting */
/* @since 1.2.2 */
int Xorriso_option_list_arg_sorting(struct XorrisO *xorriso, int flag);
/* Option -list_delimiter */
int Xorriso_option_list_delimiter(struct XorrisO *xorriso, char *text,
int flag);
/* Option -list_extras */
/* @since 1.1.6 */
int Xorriso_option_list_extras(struct XorrisO *xorriso, char *mode, int flag);
/* Option -list_formats */
@ -933,6 +960,7 @@ int Xorriso_option_list_profiles(struct XorrisO *xorriso, char *which,
int flag);
/* Option -list_speeds */
/* @since 1.1.2 */
int Xorriso_option_list_speeds(struct XorrisO *xorriso, int flag);
/* Option -load session|track|sbsector value */
@ -1174,11 +1202,13 @@ int Xorriso_option_set_filter(struct XorrisO *xorriso, char *name,
/* Option -signal_handling */
/* @param flag bit0= do not yet install the eventual handler
@since 1.1.0
*/
int Xorriso_option_signal_handling(struct XorrisO *xorriso, char *mode,
int flag);
/* Option -sleep */
/* @since 1.1.8 */
int Xorriso_option_sleep(struct XorrisO *xorriso, char *duration, int flag);
/* Option -speed */
@ -1248,6 +1278,11 @@ int Xorriso_option_volset_id(struct XorrisO *xorriso, char *name, int flag);
int Xorriso_option_volume_date(struct XorrisO *xorriso,
char *time_type, char *timestring, int flag);
/* There is no Xorriso_option_x() because -x has an effect only in
Xorriso_prescan_args(). Use the flag bits of Xorriso_interpreter() if
you want to impose command sorting on your own.
*/
/* Option -xattr "on"|"off" */
int Xorriso_option_xattr(struct XorrisO *xorriso, char *mode, int flag);

View File

@ -392,7 +392,8 @@ File: xorriso.info, Node: Processing, Next: Dialog, Prev: Extras, Up: Top
********************
Commands are either actions which happen immediately or settings which
influence following actions. So their sequence does matter.
influence following actions. So their sequence does matter, unless they
are given as program arguments and option *-x* is among them.
Commands consist of a command word, followed by zero or more parameter
words. If the list of parameter words is of variable length (indicated
by "[...]" or "[***]") then it has to be terminated by either the *list
@ -499,6 +500,7 @@ inner dashes are interpreted as underscores.
* Menu:
* ArgSort:: Execution order of program arguments
* AqDrive:: Aquiring source and target drive
* Loading:: Influencing the behavior of image loading
* Insert:: Inserting files into ISO image
@ -522,9 +524,39 @@ inner dashes are interpreted as underscores.
* Frontend:: Support for frontend programs via stdin and stdout

File: xorriso.info, Node: AqDrive, Next: Loading, Prev: Options, Up: Options
File: xorriso.info, Node: ArgSort, Next: AqDrive, Prev: Options, Up: Options
9.1 Aquiring source and target drive
9.1 Execution order of program arguments
========================================
By default the program arguments of a xorriso run are interpreted as a
sequence of commands which get performed exactly in the given order.
This requires the user to write commands for desired settings before the
commands which shall be influenced by those settings.
Many other programs allow to hand over options as program arguments in
an arbitrary sequence and perform settings and actions in a sequence of
their own discretion. xorriso provides an option to enable such a
behavior at the cost of losing freedom of expression.
-x
Enable automatic sorting of program arguments to a sequence that
most likely makes some sense. This command may be given at any
position among the commands which are handed over as program
arguments.
It works only if it is given as program argument. I.e. not in
startup files. not with -options_from_file, not in dialog mode.
-list_arg_sorting
List all xorriso commands in the order which applies if option -x
is in effect.
This list may also be helpful without -x, for a user who ponders
over the sequence in which to put commands. Deviations from the
sorting order may well make sense, though.

File: xorriso.info, Node: AqDrive, Next: Loading, Prev: ArgSort, Up: Options
9.2 Aquiring source and target drive
====================================
The effect of aquiring a drive may depend on several options in the
@ -584,7 +616,7 @@ commands which aquire the drive.

File: xorriso.info, Node: Loading, Next: Insert, Prev: AqDrive, Up: Options
9.2 Influencing the behavior of image loading
9.3 Influencing the behavior of image loading
=============================================
The following options should normally be performed before loading an
@ -847,7 +879,7 @@ activate them only after image loading.

File: xorriso.info, Node: Insert, Next: SetInsert, Prev: Loading, Up: Options
9.3 Inserting files into ISO image
9.4 Inserting files into ISO image
==================================
The following commands expect file addresses of two kinds: *disk_path*
@ -1040,7 +1072,7 @@ filesystem.

File: xorriso.info, Node: SetInsert, Next: Manip, Prev: Insert, Up: Options
9.4 Settings for file insertion
9.5 Settings for file insertion
===============================
-file_size_limit value [value [...]] --
@ -1209,7 +1241,7 @@ File: xorriso.info, Node: SetInsert, Next: Manip, Prev: Insert, Up: Options

File: xorriso.info, Node: Manip, Next: CmdFind, Prev: SetInsert, Up: Options
9.5 File manipulations
9.6 File manipulations
======================
The following commands manipulate files in the ISO image, regardless
@ -1394,7 +1426,7 @@ whether they stem from the loaded image or were newly inserted.

File: xorriso.info, Node: CmdFind, Next: Filter, Prev: Manip, Up: Options
9.6 Tree traversal command -find
9.7 Tree traversal command -find
================================
-find iso_rr_path [test [op] [test ...]] [-exec action [params]] --
@ -1643,7 +1675,7 @@ File: xorriso.info, Node: CmdFind, Next: Filter, Prev: Manip, Up: Options

File: xorriso.info, Node: Filter, Next: Writing, Prev: CmdFind, Up: Options
9.7 Filters for data file content
9.8 Filters for data file content
=================================
*Filters* may be installed between data files in the ISO image and their
@ -1731,7 +1763,7 @@ there are many small files.

File: xorriso.info, Node: Writing, Next: SetWrite, Prev: Filter, Up: Options
9.8 Writing the result, drive control
9.9 Writing the result, drive control
=====================================
(see also paragraph about settings below)
@ -1885,8 +1917,8 @@ File: xorriso.info, Node: Writing, Next: SetWrite, Prev: Filter, Up: Options

File: xorriso.info, Node: SetWrite, Next: Bootable, Prev: Writing, Up: Options
9.9 Settings for result writing
===============================
9.10 Settings for result writing
================================
Rock Ridge info will be generated by the program unconditionally. ACLs
will be written according to the setting of option -acl.
@ -2170,7 +2202,7 @@ will be written according to the setting of option -acl.

File: xorriso.info, Node: Bootable, Next: Jigdo, Prev: SetWrite, Up: Options
9.10 Bootable ISO images
9.11 Bootable ISO images
========================
Contrary to published specifications many BIOSes will load an El Torito
@ -2397,7 +2429,7 @@ filesystem and announced by an MBR partition table entry.

File: xorriso.info, Node: Jigdo, Next: Charset, Prev: Bootable, Up: Options
9.11 Jigdo Template Extraction
9.12 Jigdo Template Extraction
==============================
From man genisoimage: "Jigdo is a tool to help in the distribution of
@ -2476,7 +2508,7 @@ emulation, and padding will be counted as part of the ISO image.

File: xorriso.info, Node: Charset, Next: Exception, Prev: Jigdo, Up: Options
9.12 Character sets
9.13 Character sets
===================
File names are strings of non-zero bytes with 8 bit each. Unfortunately
@ -2528,7 +2560,7 @@ display on your terminal.

File: xorriso.info, Node: Exception, Next: DialogCtl, Prev: Charset, Up: Options
9.13 Exception processing
9.14 Exception processing
=========================
Since the tasks of `xorriso' are manifold and prone to external
@ -2643,7 +2675,7 @@ failed unexpectedly.

File: xorriso.info, Node: DialogCtl, Next: Inquiry, Prev: Exception, Up: Options
9.14 Dialog mode control
9.15 Dialog mode control
========================
-dialog "on"|"off"|"single_line"
@ -2698,7 +2730,7 @@ File: xorriso.info, Node: DialogCtl, Next: Inquiry, Prev: Exception, Up: Opt

File: xorriso.info, Node: Inquiry, Next: Navigate, Prev: DialogCtl, Up: Options
9.15 Drive and media related inquiry actions
9.16 Drive and media related inquiry actions
============================================
-devices
@ -2796,7 +2828,7 @@ File: xorriso.info, Node: Inquiry, Next: Navigate, Prev: DialogCtl, Up: Opti

File: xorriso.info, Node: Navigate, Next: Verify, Prev: Inquiry, Up: Options
9.16 Navigation in ISO image and disk filesystem
9.17 Navigation in ISO image and disk filesystem
================================================
-cd iso_rr_path
@ -2981,7 +3013,7 @@ File: xorriso.info, Node: Navigate, Next: Verify, Prev: Inquiry, Up: Options

File: xorriso.info, Node: Verify, Next: Restore, Prev: Navigate, Up: Options
9.17 Evaluation of readability and recovery
9.18 Evaluation of readability and recovery
===========================================
It is not uncommon that optical media produce read errors. The reasons
@ -3147,7 +3179,7 @@ transmission errors.

File: xorriso.info, Node: Restore, Next: Emulation, Prev: Verify, Up: Options
9.18 osirrox ISO-to-disk restore options
9.19 osirrox ISO-to-disk restore options
========================================
Normally `xorriso' only writes to disk files which were given as stdio:
@ -3280,7 +3312,7 @@ The directory permissions on disk have to allow rwx.

File: xorriso.info, Node: Emulation, Next: Scripting, Prev: Restore, Up: Options
9.19 Command compatibility emulations (cdrtools)
9.20 Command compatibility emulations (cdrtools)
================================================
Writing of ISO 9660 on CD is traditionally done by program mkisofs as
@ -3458,7 +3490,7 @@ said programs trigger comparable actions.

File: xorriso.info, Node: Scripting, Next: Frontend, Prev: Emulation, Up: Options
9.20 Scripting, dialog and program control features
9.21 Scripting, dialog and program control features
===================================================
-no_rc
@ -3624,7 +3656,7 @@ File: xorriso.info, Node: Scripting, Next: Frontend, Prev: Emulation, Up: Op

File: xorriso.info, Node: Frontend, Next: ExDevices, Prev: Scripting, Up: Options
9.21 Support for frontend programs via stdin and stdout
9.22 Support for frontend programs via stdin and stdout
=======================================================
-pkt_output "on"|"off"
@ -4355,6 +4387,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -iso_rr_pattern controls pattern expansion: Manip. (line 10)
* -jigdo clears JTE or or adds parameter to JTE: Jigdo. (line 33)
* -joliet enables production of Joliet tree: SetWrite. (line 10)
* -list_arg_sorting prints sorting order of -x: ArgSort. (line 24)
* -list_delimiter replaces '--': Scripting. (line 60)
* -list_extras lists compile time extra features: Scripting.
(line 26)
@ -4460,6 +4493,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -volid sets volume id: SetWrite. (line 93)
* -volset_id sets volume set id: SetWrite. (line 112)
* -volume_date sets volume timestamp: SetWrite. (line 139)
* -x enables automatic execution order of options: ArgSort. (line 16)
* -xattr controls handling of xattr (EA): Loading. (line 150)
* -zisofs controls zisofs production: SetWrite. (line 203)
@ -4481,7 +4515,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* ACL, show in ISO image, -getfacl_r: Navigate. (line 77)
* Appendable media, _definition: Media. (line 38)
* Appended Filesystem Image, -append_partition: Bootable. (line 199)
* Backslash Interpretation, _definition: Processing. (line 48)
* Automatic execution order, of options, -x: ArgSort. (line 16)
* Backslash Interpretation, _definition: Processing. (line 49)
* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 189)
* Backup, enable features, -for_backup: Loading. (line 184)
* Backup, scdbackup checksum tag, -scdbackup: Emulation. (line 168)
@ -4593,7 +4628,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* iso_rr_path, _definition: Insert. (line 7)
* Jigdo Template Extraction, -jigdo: Jigdo. (line 33)
* Jigdo Template Extraction, _definition: Jigdo. (line 6)
* List delimiter, _definiton: Processing. (line 8)
* List delimiter, _definiton: Processing. (line 9)
* MBR, _definiton: Extras. (line 26)
* MBR, set, -boot_image system_area=: Bootable. (line 121)
* MD5, control handling, -md5: Loading. (line 155)
@ -4630,7 +4665,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Partition offset, _definiton: Bootable. (line 146)
* Partition table, _definiton: Bootable. (line 128)
* Pathspec, _definition: SetInsert. (line 120)
* Pattern expansion, _definition: Processing. (line 22)
* Pattern expansion, _definition: Processing. (line 23)
* Pattern expansion, for disk paths, -disk_pattern: Insert. (line 31)
* Pattern expansion, for ISO paths, -iso_rr_pattern: Manip. (line 10)
* Permissions, in ISO image, -chmod: Manip. (line 58)
@ -4665,7 +4700,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Program, show current settings, -status: Scripting. (line 47)
* Program, status history, -status_history_max: Scripting. (line 56)
* Program, wait a time span, -sleep: Scripting. (line 114)
* Quoted input, _definiton: Processing. (line 42)
* Quoted input, _definiton: Processing. (line 43)
* Recovery, retrieve blocks, -check_media: Verify. (line 21)
* Rename, in ISO image, -mv: Manip. (line 35)
* Restore, copy file into disk file, -paste_in: Restore. (line 121)
@ -4686,6 +4721,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Session, mount command line, -mount_cmd: Inquiry. (line 41)
* Session, mount parameters, -mount_opts: Inquiry. (line 57)
* Session, select as input, -load: Loading. (line 11)
* Sorting order, for -x, -list_arg_sorting: ArgSort. (line 24)
* SUN Disk Label, production: Bootable. (line 187)
* SUN SPARC boot images, activation: Bootable. (line 220)
* System area, _definiton: Bootable. (line 121)
@ -4737,51 +4773,52 @@ Node: Methods8817
Node: Drives11386
Node: Extras14699
Node: Processing18416
Node: Dialog21886
Node: Options23549
Node: AqDrive25157
Node: Loading28194
Node: Insert42463
Node: SetInsert52169
Node: Manip60737
Node: CmdFind69467
Node: Filter81572
Node: Writing85910
Node: SetWrite93911
Node: Bootable108214
Node: Jigdo121434
Node: Charset125680
Node: Exception128439
Node: DialogCtl134552
Node: Inquiry137139
Node: Navigate142002
Node: Verify150260
Node: Restore158927
Node: Emulation165832
Node: Scripting175637
Node: Frontend182802
Node: Examples184101
Node: ExDevices185278
Node: ExCreate185937
Node: ExDialog187219
Node: ExGrowing188482
Node: ExModifying189287
Node: ExBootable189790
Node: ExCharset190342
Node: ExPseudo191162
Node: ExCdrecord192060
Node: ExMkisofs192377
Node: ExGrowisofs193717
Node: ExException194852
Node: ExTime195306
Node: ExIncBackup195765
Node: ExRestore199751
Node: ExRecovery200711
Node: Files201281
Node: Seealso202579
Node: Bugreport203302
Node: Legal203883
Node: CommandIdx204813
Node: ConceptIdx219909
Node: Dialog21960
Node: Options23623
Node: ArgSort25292
Node: AqDrive26646
Node: Loading29683
Node: Insert43952
Node: SetInsert53658
Node: Manip62226
Node: CmdFind70956
Node: Filter83061
Node: Writing87399
Node: SetWrite95400
Node: Bootable109705
Node: Jigdo122925
Node: Charset127171
Node: Exception129930
Node: DialogCtl136043
Node: Inquiry138630
Node: Navigate143493
Node: Verify151751
Node: Restore160418
Node: Emulation167323
Node: Scripting177128
Node: Frontend184293
Node: Examples185592
Node: ExDevices186769
Node: ExCreate187428
Node: ExDialog188710
Node: ExGrowing189973
Node: ExModifying190778
Node: ExBootable191281
Node: ExCharset191833
Node: ExPseudo192653
Node: ExCdrecord193551
Node: ExMkisofs193868
Node: ExGrowisofs195208
Node: ExException196343
Node: ExTime196797
Node: ExIncBackup197256
Node: ExRestore201242
Node: ExRecovery202202
Node: Files202772
Node: Seealso204070
Node: Bugreport204793
Node: Legal205374
Node: CommandIdx206304
Node: ConceptIdx221546

End Tag Table

View File

@ -50,7 +50,7 @@
@c man .\" First parameter, NAME, should be all caps
@c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
@c man .\" other parameters are allowed: see man(7), man(1)
@c man .TH XORRISO 1 "Version 1.2.1, Jan 27, 2012"
@c man .TH XORRISO 1 "Version 1.2.1, Jan 31, 2012"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -591,7 +591,10 @@ only on GNU/Linux and FreeBSD, where they are known as extattr.
@c man .B Command processing:
@c man .br
Commands are either actions which happen immediately or settings which
influence following actions. So their sequence does matter.
influence following actions. So their sequence does matter, unless they are
given as program arguments and option
@strong{-x}
is among them.
@*
@cindex List delimiter, _definiton
Commands consist of a command word,
@ -729,6 +732,7 @@ the dashes of the emulated options are mandatory.
Normally any number of leading dashes is ignored with command words and
inner dashes are interpreted as underscores.
@menu
* ArgSort:: Execution order of program arguments
* AqDrive:: Aquiring source and target drive
* Loading:: Influencing the behavior of image loading
* Insert:: Inserting files into ISO image
@ -752,7 +756,44 @@ inner dashes are interpreted as underscores.
* Frontend:: Support for frontend programs via stdin and stdout
@end menu
@c man .TP
@node AqDrive, Loading, Options, Options
@node ArgSort, AqDrive, Options, Options
@section Execution order of program arguments
@c man .B Execution order of program arguments:
@c man .PP
By default the program arguments of a xorriso run are interpreted as a
sequence of commands which get performed exactly in the given order.
This requires the user to write commands for desired settings before the
commands which shall be influenced by those settings.
@*
Many other programs allow to hand over options as program arguments
in an arbitrary sequence and perform settings and actions in a sequence
of their own discretion. xorriso provides an option to enable such a behavior
at the cost of losing freedom of expression.
@table @asis
@sp 1
@c man .TP
@item -x
@kindex -x enables automatic execution order of options
@cindex Automatic execution order, of options, -x
Enable automatic sorting of program arguments to a sequence that most likely
makes some sense. This command may be given at any position among the commands
which are handed over as program arguments.
@*
It works only if it is given as program argument. I.e. not
in startup files. not with -options_from_file, not in dialog mode.
@c man .TP
@item -list_arg_sorting
@kindex -list_arg_sorting prints sorting order of -x
@cindex Sorting order, for -x, -list_arg_sorting
List all xorriso commands in the order which applies if option -x is in effect.
@*
This list may also be helpful without -x, for a user who ponders over the
sequence in which to put commands. Deviations from the sorting order may
well make sense, though.
@end table
@c man .PP
@c man .TP
@node AqDrive, Loading, ArgSort, Options
@section Aquiring source and target drive
@c man .B Aquiring source and target drive:
@c man .PP

View File

@ -2,7 +2,7 @@
/* Command line oriented batch and dialog tool which creates, loads,
manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2011 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2012 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -102,6 +102,8 @@ struct XorrisO { /* the global context of xorriso */
char rc_filenames[Xorriso_rc_nuM][SfileadrL];
int rc_filename_count;
int arrange_args;
/* Whether .mkisofsrc has already been read */
int mkisofsrc_done;

View File

@ -1 +1 @@
#define Xorriso_timestamP "2012.01.27.155323"
#define Xorriso_timestamP "2012.01.31.130405"