Bug fix: -as mkisofs did not unescape "\=" in the source part of pathspecs

This commit is contained in:
Thomas Schmitt 2015-12-09 13:28:06 +00:00
parent 4b4bf14b05
commit bafcf288f9
10 changed files with 300 additions and 169 deletions

View File

@ -1132,6 +1132,74 @@ ex:;
}
/* Implementing mkisofs tendency to map single-path pathspecs to / */
int Xorriso_graftable_pathspec(struct XorrisO *xorriso, char *in_pathspec,
char *pathspec, int flag)
{
int ret, l;
char *esc_wdx= NULL, *eff_path= NULL, *ept;
if((!xorriso->allow_graft_points) ||
Fileliste__target_source_limit(in_pathspec, '=', &ept, 0) <= 0) {
Xorriso_alloc_meM(esc_wdx, char, SfileadrL);
Xorriso_alloc_meM(eff_path, char, SfileadrL);
strcpy(esc_wdx, xorriso->wdx);
if(!xorriso->allow_graft_points) {
ret= Fileliste__escape_source_path(esc_wdx, SfileadrL, 0);
if(ret <= 0) {
Xorriso_msgs_submit(xorriso, 0,
"Escaped -cdx directory gets much too long", 0, "FAILURE", 0);
ret= 0; goto ex;
}
}
ret= Xorriso_normalize_img_path(xorriso, esc_wdx, in_pathspec,
eff_path, 2|4);
if(ret <= 0)
{ret= 0; goto ex;}
ret= Sfile_type(eff_path,
1 | ((xorriso->do_follow_param || xorriso->do_follow_links) << 2));
if(ret == 2) {
strcpy(pathspec, "/=");
} else {
pathspec[0]= '/';
pathspec[1]= 0;
ret= Sfile_leafname(eff_path, pathspec + 1, 0);
if(ret>0) {
if(!xorriso->allow_graft_points) {
ret= Fileliste__escape_source_path(pathspec, SfileadrL, 0);
if(ret <= 0) {
Xorriso_msgs_submit(xorriso, 0,
"Escaped leaf name gets much too long", 0, "FAILURE", 0);
ret= 0; goto ex;
}
}
strcat(pathspec, "=");
} else
pathspec[0]= 0;
}
l= strlen(pathspec);
strcat(pathspec, eff_path);
if(!xorriso->allow_graft_points) {
ret= Fileliste__escape_source_path(pathspec + l, 2 * SfileadrL - l, 0);
if(ret <= 0) {
Xorriso_msgs_submit(xorriso, 0,
"Escaped path gets much too long", 0, "FAILURE", 0);
ret= 0; goto ex;
}
}
} else {
Sfile_str(pathspec, in_pathspec, 0);
}
ret= 1;
ex:;
Xorriso_free_meM(esc_wdx);
Xorriso_free_meM(eff_path);
return(ret);
}
int Xorriso_genisofs_path_pecul(struct XorrisO *xorriso, int *was_path,
int with_emul_toc, int *allow_dir_id_ext,
int *iso_level, int flag)
@ -1673,7 +1741,7 @@ illegal_c:;
goto problem_handler_2;
} else if(strcmp(argpt, "-graft-points")==0) {
xorriso->allow_graft_points= 1;
xorriso->allow_graft_points= 3;
} else if(strcmp(argpt, "-path-list")==0 ||
strcmp(argpt, "--quoted_path_list")==0) {
if(i+1>=argc) {
@ -1686,7 +1754,7 @@ not_enough_args:;
i++;
xorriso->pacifier_style= 1;
ret= Xorriso_option_path_list(xorriso, argv[i],
(strcmp(argpt, "--quoted_path_list")==0));
(strcmp(argpt, "--quoted_path_list") == 0) | 2);
if(ret<=0)
goto problem_handler_2;
ret = Xorriso_genisofs_path_pecul(xorriso, &was_path, with_emul_toc,
@ -2135,36 +2203,9 @@ rr_reloc_dir:;
}
}
} else {
/* implementing mkisofs tendency to map single-path pathspecs to / */
if((!xorriso->allow_graft_points) ||
Fileliste__target_source_limit(argv[i], '=', &ept, 0)<=0) {
ret= Xorriso_normalize_img_path(xorriso, xorriso->wdx, argv[i],
eff_path, 2|4);
if(ret<=0)
ret= Xorriso_graftable_pathspec(xorriso, argv[i], pathspec, 0);
if(ret <= 0)
goto problem_handler_2;
ret= Sfile_type(eff_path,
1|((xorriso->do_follow_param||xorriso->do_follow_links)<<2));
if(ret==2) {
strcpy(pathspec, "/=");
} else {
pathspec[0]= '/';
pathspec[1]= 0;
ret= Sfile_leafname(eff_path, pathspec+1, 0);
if(ret>0) {
ret= Fileliste__escape_source_path(pathspec, SfileadrL, 0);
if(ret <= 0) {
Xorriso_msgs_submit(xorriso, 0,
"Escaped leaf name gets much too long",
0, "FAILURE", 0);
goto problem_handler_2;
}
strcat(pathspec, "=");
} else
pathspec[0]= 0;
}
strcat(pathspec, eff_path);
} else
Sfile_str(pathspec, argv[i], 0);
add_pt= pathspec;
if(old_root[0]) {
@ -2205,10 +2246,10 @@ rr_reloc_dir:;
ret= Xorriso_option_update(xorriso, disk_pt, iso_rr_pt, 1 | 8 | 32);
} else {
mem_graft_points= xorriso->allow_graft_points;
xorriso->allow_graft_points= 1;
xorriso->allow_graft_points= 3;
zero= 0;
ret= Xorriso_option_add(xorriso, 1, &add_pt, &zero,
(was_path << 1) | (root_seen << 2) | 8);
(was_path << 1) | (root_seen << 2));
xorriso->allow_graft_points= mem_graft_points;
}
if(ret<=0)

View File

@ -95,18 +95,37 @@ int Xorriso_option_acl(struct XorrisO *xorriso, char *mode, int flag)
}
/* @param flag bit3= unescape \\
*/
static void unescape_pathspec_part(char *rpt, int flag)
{
char *wpt;
wpt= rpt;
for(; *rpt != 0; rpt++) {
if(*rpt == '\\') {
if(*(rpt + 1) == '=')
continue;
if((flag & 8) && *(rpt + 1) == '\\')
rpt++;
}
*(wpt++)= *rpt;
}
*wpt= 0;
}
/* Option -add */
/* @param flag bit0=do not report the added item
bit1=do not reset pacifier, no final pacifier message
bit2= prepend ISO working directory in any case
bit3= unescape \\
*/
int Xorriso_option_add(struct XorrisO *xorriso, int argc, char **argv,
int *idx, int flag)
{
int i, end_idx, ret, was_failure= 0, fret, optc= 0, split;
int i, end_idx, ret, was_failure= 0, fret, optc= 0, split, as_mkisofs= 0;
char *target= NULL, *source= NULL, *ept, *eff_path= NULL;
char **optv= NULL, *rpt, *wpt;
char **optv= NULL;
ret= Xorriso_opt_args(xorriso, "-add", argc, argv, *idx, &end_idx,
&optc, &optv, ((!!xorriso->allow_graft_points)<<2)|2);
@ -117,6 +136,8 @@ int Xorriso_option_add(struct XorrisO *xorriso, int argc, char **argv,
Xorriso_alloc_meM(source, char, SfileadrL);
Xorriso_alloc_meM(eff_path, char, SfileadrL);
if(xorriso->allow_graft_points & 2)
as_mkisofs= 8;
if(!(flag&2))
Xorriso_pacifier_reset(xorriso, 0);
for(i= 0; i<optc; i++) {
@ -132,20 +153,13 @@ int Xorriso_option_add(struct XorrisO *xorriso, int argc, char **argv,
split= 1;
}
/* unescape \= */;
if(split)
rpt= wpt= target;
else
rpt= wpt= source;
for(; *rpt!=0; rpt++) {
if(*rpt=='\\') {
if(*(rpt+1)=='=')
continue;
if((flag & 8) && *(rpt + 1) == '\\')
rpt++;
if(split) {
unescape_pathspec_part(target, as_mkisofs);
if(as_mkisofs)
unescape_pathspec_part(source, as_mkisofs);
} else {
unescape_pathspec_part(source, as_mkisofs);
}
*(wpt++)= *rpt;
}
*wpt= 0;
}
if(split==0)
strcpy(target, source);

View File

@ -1921,9 +1921,9 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
"Commands marked by [***] have variable length parameter lists and perform",
"pattern expansion if enabled by -iso_rr_pattern or -disk_pattern.",
"",
" -pathspecs \"on\"|\"off\" Allow or disallow pathspecs of form ",
" iso_rr_path=disk_path . Only \"off\" allows eventual",
" -disk_pattern expansion.",
" -pathspecs \"on\"|\"off\"|\"as_mkisofs\"",
" Allow or disallow pathspecs of form iso_rr_path=disk_path",
" Only \"off\" allows -disk_pattern expansion.",
" -file_name_limit number",
" Set truncation size for file names [64 ... 255].",
" -file_size_limit value [...]",

View File

@ -154,14 +154,17 @@ int Xorriso_option_paste_in(struct XorrisO *xorriso, char *iso_rr_path,
/* Option -path_list , -quoted_path_list */
/* @param flag bit0= -quoted_path_list */
/* @param flag bit0= -quoted_path_list
bit1= mkisofs mode: Use / as target for pathspecs without =
*/
int Xorriso_option_path_list(struct XorrisO *xorriso, char *adr, int flag)
{
int ret,linecount= 0, insertcount= 0, null= 0, was_failure= 0, fret= 0;
int was_ferror= 0, argc= 0, i;
int was_ferror= 0, argc= 0, i, allow_graft_points_mem;
FILE *fp= NULL;
char **argv= NULL;
char **argv= NULL, *pathspec= NULL;
allow_graft_points_mem= xorriso->allow_graft_points;
Xorriso_pacifier_reset(xorriso, 0);
if(adr[0]==0) {
sprintf(xorriso->info_text,"Empty file name given with %s",
@ -172,6 +175,8 @@ int Xorriso_option_path_list(struct XorrisO *xorriso, char *adr, int flag)
ret= Xorriso_afile_fopen(xorriso, adr, "rb", &fp, 0);
if(ret <= 0)
return(0);
Xorriso_alloc_meM(pathspec, char, 2 * SfileadrL);
while(1) {
ret= Xorriso_read_lines(xorriso, fp, &linecount, &argc, &argv,
4 | (flag & 1) );
@ -183,7 +188,16 @@ int Xorriso_option_path_list(struct XorrisO *xorriso, char *adr, int flag)
if(argv[i][0] == 0)
continue;
null= 0;
ret= Xorriso_option_add(xorriso, 1, argv + i, &null, 1|2);
if(flag & 2) {
ret= Xorriso_graftable_pathspec(xorriso, argv[i], pathspec, 0);
if(ret <= 0)
goto problem_handler;
xorriso->allow_graft_points= 3;
ret= Xorriso_option_add(xorriso, 1, &pathspec, &null, 1 | 2);
xorriso->allow_graft_points= allow_graft_points_mem;
} else {
ret= Xorriso_option_add(xorriso, 1, argv + i, &null, 1 | 2);
}
if(ret<=0 || xorriso->request_to_abort)
goto problem_handler;
insertcount++;
@ -201,6 +215,9 @@ problem_handler:;
}
ret= 1;
ex:;
xorriso->allow_graft_points= allow_graft_points_mem;
Sfile_make_argv("", "", &argc, &argv, 2);
Xorriso_free_meM(pathspec);
if(flag & 1)
Xorriso_read_lines(xorriso, fp, &linecount, &argc, &argv, 2);
@ -234,6 +251,8 @@ int Xorriso_option_pathspecs(struct XorrisO *xorriso, char *mode, int flag)
xorriso->allow_graft_points= 0;
else if(strcmp(mode, "on")==0)
xorriso->allow_graft_points= 1;
else if(strcmp(mode, "as_mkisofs")==0)
xorriso->allow_graft_points= 3;
else {
sprintf(xorriso->info_text, "-pathspecs: unknown mode '%s'", mode);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);

View File

@ -3313,7 +3313,9 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
Xorriso_status_zisofs(xorriso, filter, fp, flag & 3);
is_default= !xorriso->allow_graft_points;
sprintf(line,"-pathspecs %s\n", xorriso->allow_graft_points ? "on" : "off");
sprintf(line,"-pathspecs %s\n",
(xorriso->allow_graft_points & 2) ? "as_mkisofs" :
xorriso->allow_graft_points ? "on" : "off");
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);

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.4.3, Nov 29, 2015"
.TH XORRISO 1 "Version 1.4.3, Dec 08, 2015"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -1150,13 +1150,21 @@ Default is "ls".
Insert the given files or directory trees from filesystem
into the ISO image.
.br
If \-pathspecs is set to "on" then pattern expansion is always disabled and
character '=' has a special meaning. It separates the ISO image path
from the disk path:
If \-pathspecs is set to "on" or "as_mkisofs" then pattern expansion is always
disabled and character '=' has a special meaning. It separates the ISO image
path from the disk path:
.br
iso_rr_path=disk_path
.br
The separator '=' can be escaped by '\\'.
Character '=' in the iso_rr_path must be escaped by '\\' (i.e. as "\\=").
.br
With \-pathspecs "on", the character '\\' must not be escaped. The character '='
in the disk_path must not be escaped.
.br
With \-pathspecs "as_mkisofs", all characters '\\' must be escaped in both,
iso_rr_path and disk_path. The character '=' may or may not be escaped
in the disk_path.
.br
If iso_rr_path does not begin with '/' then \-cd is prepended.
If disk_path does not begin with '/' then \-cdx is prepended.
.br
@ -1462,16 +1470,26 @@ cause exponential workload before their loops get detected.
The number given with "limit=" can curb this workload at the risk of truncating
an intentional sequence of link hops.
.TP
\fB\-pathspecs\fR "on"|"off"
\fB\-pathspecs\fR "on"|"off"|"as_mkisofs"
Control parameter interpretation with \fBxorriso\fR
actions \-add and \-path_list.
.br
"on" enables pathspecs of the form
\fBtarget=source\fR
like with program mkisofs \-graft\-points.
It also disables \-disk_pattern expansion for command \-add.
Mode "as_mkisofs" enables pathspecs of the form
.br
"off" disables pathspecs of the form target=source
\fBiso_rr_path=disk_path\fR
.br
like with program mkisofs \-graft\-points.
.br
All characters '\\' must be escaped in both, iso_rr_path and disk_path.
The character '=' must be escaped in the iso_rr_path and
may or may not be escaped in the disk_path.
This mode temporarily disables \-disk_pattern expansion for command \-add.
.br
Mode "on" does nearly the same. But '=' must only be escaped in the iso_rr_path
and '\\' must not be escaped at all. This has the disadvantage that one
cannot express an iso_rr_path which ends by '\\'.
.br
Mode "off" disables pathspecs of the form target=source
and re\-enables \-disk_pattern expansion.
.TP
\fB\-overwrite\fR "on"|"nondir"|"off"

View File

@ -1033,13 +1033,19 @@ filesystem.
-add pathspec [...] | disk_path [***]
Insert the given files or directory trees from filesystem into the
ISO image.
If -pathspecs is set to "on" then pattern expansion is always
disabled and character '=' has a special meaning. It separates the
ISO image path from the disk path:
If -pathspecs is set to "on" or "as_mkisofs" then pattern expansion
is always disabled and character '=' has a special meaning. It
separates the ISO image path from the disk path:
iso_rr_path=disk_path
The separator '=' can be escaped by '\'. If iso_rr_path does not
begin with '/' then -cd is prepended. If disk_path does not begin
with '/' then -cdx is prepended.
Character '=' in the iso_rr_path must be escaped by '\' (i.e. as
"\=").
With -pathspecs "on", the character '\' must not be escaped. The
character '=' in the disk_path must not be escaped.
With -pathspecs "as_mkisofs", all characters '\' must be escaped in
both, iso_rr_path and disk_path. The character '=' may or may not
be escaped in the disk_path.
If iso_rr_path does not begin with '/' then -cd is prepended. If
disk_path does not begin with '/' then -cdx is prepended.
If no '=' is given then the word is used as both, iso_rr_path and
disk path. If in this case the word does not begin with '/' then
-cdx is prepended to the disk_path and -cd is prepended to the
@ -1286,14 +1292,22 @@ File: xorriso.info, Node: SetInsert, Next: Manip, Prev: Insert, Up: Commands
their loops get detected. The number given with "limit=" can curb
this workload at the risk of truncating an intentional sequence of
link hops.
-pathspecs "on"|"off"
-pathspecs "on"|"off"|"as_mkisofs"
Control parameter interpretation with 'xorriso' actions -add and
-path_list.
"on" enables pathspecs of the form *target=source* like with
program mkisofs -graft-points. It also disables -disk_pattern
expansion for command -add.
"off" disables pathspecs of the form target=source and re-enables
-disk_pattern expansion.
Mode "as_mkisofs" enables pathspecs of the form
*iso_rr_path=disk_path*
like with program mkisofs -graft-points.
All characters '\' must be escaped in both, iso_rr_path and
disk_path. The character '=' must be escaped in the iso_rr_path
and may or may not be escaped in the disk_path. This mode
temporarily disables -disk_pattern expansion for command -add.
Mode "on" does nearly the same. But '=' must only be escaped in
the iso_rr_path and '\' must not be escaped at all. This has the
disadvantage that one cannot express an iso_rr_path which ends by
'\'.
Mode "off" disables pathspecs of the form target=source and
re-enables -disk_pattern expansion.
-overwrite "on"|"nondir"|"off"
Allow or disallow overwriting of existing files in the ISO image by
files with the same name.
@ -5030,7 +5044,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -abstract_file sets abstract file name: SetWrite. (line 228)
* -acl controls handling of ACLs: Loading. (line 171)
* -add inserts one or more paths: Insert. (line 44)
* -add_plainly inserts one or more paths: Insert. (line 62)
* -add_plainly inserts one or more paths: Insert. (line 68)
* -alter_date sets timestamps in ISO image: Manip. (line 136)
* -alter_date_r sets timestamps in ISO image: Manip. (line 168)
* -append_partition adds arbitrary file after image end: Bootable.
@ -5060,7 +5074,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -chmod_r sets permissions in ISO image: Manip. (line 66)
* -chown sets ownership in ISO image: Manip. (line 43)
* -chown_r sets ownership in ISO image: Manip. (line 47)
* -clone copies ISO directory tree: Insert. (line 164)
* -clone copies ISO directory tree: Insert. (line 170)
* -close controls media closing: SetWrite. (line 371)
* -close_damaged closes damaged track and session: Writing. (line 164)
* -close_filter_list bans filter registration: Filter. (line 50)
@ -5073,12 +5087,12 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -concat copies ISO file content: Restore. (line 118)
* -copyright_file sets copyright file name: SetWrite. (line 223)
* -cpax copies files to disk: Restore. (line 100)
* -cpr inserts like with cp -r: Insert. (line 143)
* -cpr inserts like with cp -r: Insert. (line 149)
* -cpx copies files to disk: Restore. (line 89)
* -cp_clone copies ISO directory tree: Insert. (line 175)
* -cp_clone copies ISO directory tree: Insert. (line 181)
* -cp_rx copies file trees to disk: Restore. (line 103)
* -cp_rx copies file trees to disk <1>: Restore. (line 111)
* -cut_out inserts piece of data file: Insert. (line 118)
* -cut_out inserts piece of data file: Insert. (line 124)
* -data_cache_size adjusts read cache size: Loading. (line 332)
* -dev acquires one drive for input and output: AqDrive. (line 12)
* -devices gets list of drives: Inquiry. (line 7)
@ -5139,7 +5153,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -list_formats lists available formats: Writing. (line 129)
* -list_profiles lists supported media: Writing. (line 177)
* -list_speeds lists available write speeds: Writing. (line 140)
* -lns creates ISO symbolic link: Insert. (line 160)
* -lns creates ISO symbolic link: Insert. (line 166)
* -load addresses a particular session as input: Loading. (line 33)
* -local_charset sets terminal character set: Charset. (line 57)
* -logfile logs output channels to file: Frontend. (line 19)
@ -5151,12 +5165,12 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -lsl lists files in ISO image: Navigate. (line 34)
* -lslx lists files on disk: Navigate. (line 54)
* -lsx lists files on disk: Navigate. (line 45)
* -map inserts path: Insert. (line 83)
* -map_l inserts paths from disk file: Insert. (line 90)
* -map_single inserts path: Insert. (line 87)
* -map inserts path: Insert. (line 89)
* -map_l inserts paths from disk file: Insert. (line 96)
* -map_single inserts path: Insert. (line 93)
* -mark sets synchronizing message: Frontend. (line 23)
* -md5 controls handling of MD5 sums: Loading. (line 182)
* -mkdir creates ISO directory: Insert. (line 156)
* -mkdir creates ISO directory: Insert. (line 162)
* -modesty_on_drive keep drive buffer hungry: SetWrite. (line 320)
* -mount issues mount command for ISO session: Restore. (line 146)
* -mount_cmd composes mount command line: Inquiry. (line 49)
@ -5174,13 +5188,13 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -osirrox enables ISO-to-disk copying: Restore. (line 18)
* -outdev acquires a drive for output: AqDrive. (line 29)
* -out_charset sets output character set: SetWrite. (line 263)
* -overwrite enables overwriting in ISO: SetInsert. (line 123)
* -overwrite enables overwriting in ISO: SetInsert. (line 131)
* -pacifier controls pacifier text form: Emulation. (line 166)
* -padding sets amount or mode of image padding: SetWrite. (line 394)
* -page set terminal geometry: DialogCtl. (line 18)
* -paste_in copies file into disk file: Restore. (line 114)
* -pathspecs sets meaning of = with -add: SetInsert. (line 115)
* -path_list inserts paths from disk file: Insert. (line 75)
* -path_list inserts paths from disk file: Insert. (line 81)
* -pkt_output consolidates text output: Frontend. (line 7)
* -preparer_id sets preparer id: SetWrite. (line 239)
* -print prints result text line: Scripting. (line 102)
@ -5195,7 +5209,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -pwd tells working directory in ISO: Navigate. (line 19)
* -pwdx tells working directory on disk: Navigate. (line 21)
* -quoted_not_list sets exclusions: SetInsert. (line 66)
* -quoted_path_list inserts paths from disk file: Insert. (line 79)
* -quoted_path_list inserts paths from disk file: Insert. (line 85)
* -read_fs filesystem type for image loading: Loading. (line 102)
* -read_mkisofsrc searches and reads .mkisofsrc file: Emulation.
(line 155)
@ -5234,7 +5248,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
(line 66)
* -sleep waits for a given time span: Scripting. (line 113)
* -speed set write speed: SetWrite. (line 285)
* -split_size enables large file splitting: SetInsert. (line 135)
* -split_size enables large file splitting: SetInsert. (line 143)
* -status shows current settings: Scripting. (line 44)
* -status_history_max curbs -status history: Scripting. (line 52)
* -stdio_sync controls stdio buffer: SetWrite. (line 356)
@ -5245,9 +5259,9 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top
* -toc shows list of sessions: Inquiry. (line 27)
* -toc_of shows list of sessions: Inquiry. (line 41)
* -uid sets global ownership: SetWrite. (line 268)
* -update inserts path if different: Insert. (line 94)
* -update_l inserts paths if different: Insert. (line 114)
* -update_r inserts paths if different: Insert. (line 104)
* -update inserts path if different: Insert. (line 100)
* -update_l inserts paths if different: Insert. (line 120)
* -update_r inserts paths if different: Insert. (line 110)
* -use_readline enables readline for dialog: DialogCtl. (line 26)
* -version prints help text: Scripting. (line 22)
* -volid sets volume id: SetWrite. (line 162)
@ -5313,9 +5327,9 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Dialog, EOF resistant, -named_pipe_loop: Frontend. (line 120)
* Dialog, line editing, -use_readline: DialogCtl. (line 26)
* Dialog, terminal geometry, -page: DialogCtl. (line 18)
* Directories, copy, -cp_clone: Insert. (line 175)
* Directory, copy, -clone: Insert. (line 164)
* Directory, create, -mkdir: Insert. (line 156)
* Directories, copy, -cp_clone: Insert. (line 181)
* Directory, copy, -clone: Insert. (line 170)
* Directory, create, -mkdir: Insert. (line 162)
* Directory, delete, -rmdir: Manip. (line 29)
* disk_path, _definition: Insert. (line 6)
* Drive, accessability, -drive_class: Loading. (line 73)
@ -5389,28 +5403,28 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Image, show MBR, GPT, and alike, -pvd_info: Inquiry. (line 137)
* Image, _definition: Model. (line 9)
* Input Character Set, _definition: Charset. (line 25)
* Insert, enable overwriting, -overwrite: SetInsert. (line 123)
* Insert, enable overwriting, -overwrite: SetInsert. (line 131)
* Insert, file exclusion absolute, -not_paths: SetInsert. (line 53)
* Insert, file exclusion from file, -not_list: SetInsert. (line 63)
* Insert, file exclusion pattern, -not_leaf: SetInsert. (line 59)
* Insert, file exclusion, -not_mgt: SetInsert. (line 22)
* Insert, file exclusion, -quoted_not_list: SetInsert. (line 66)
* Insert, if different, -update: Insert. (line 94)
* Insert, if different, -update_l: Insert. (line 114)
* Insert, if different, -update_r: Insert. (line 104)
* Insert, large file splitting, -split_size: SetInsert. (line 135)
* Insert, if different, -update: Insert. (line 100)
* Insert, if different, -update_l: Insert. (line 120)
* Insert, if different, -update_r: Insert. (line 110)
* Insert, large file splitting, -split_size: SetInsert. (line 143)
* Insert, limit data file size, -file_size_limit: SetInsert. (line 7)
* Insert, links or mount points, -follow: SetInsert. (line 69)
* Insert, meaning of = with -add, -pathspecs: SetInsert. (line 115)
* Insert, non-dashed arguments, -add_plainly: Insert. (line 62)
* Insert, path, -map: Insert. (line 83)
* Insert, path, -map_single: Insert. (line 87)
* Insert, paths from disk file, -map_l: Insert. (line 90)
* Insert, paths from disk file, -path_list: Insert. (line 75)
* Insert, paths from disk file, -quoted_path_list: Insert. (line 79)
* Insert, paths, -cpr: Insert. (line 143)
* Insert, non-dashed arguments, -add_plainly: Insert. (line 68)
* Insert, path, -map: Insert. (line 89)
* Insert, path, -map_single: Insert. (line 93)
* Insert, paths from disk file, -map_l: Insert. (line 96)
* Insert, paths from disk file, -path_list: Insert. (line 81)
* Insert, paths from disk file, -quoted_path_list: Insert. (line 85)
* Insert, paths, -cpr: Insert. (line 149)
* Insert, pathspecs, -add: Insert. (line 44)
* Insert, piece of data file, -cut_out: Insert. (line 118)
* Insert, piece of data file, -cut_out: Insert. (line 124)
* Interval reader for system area and partitions: Bootable. (line 26)
* ISO 9660, _definition: Model. (line 6)
* iso_rr_path, _definition: Insert. (line 7)
@ -5523,7 +5537,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top
* Sorting order, for -x, -list_arg_sorting: ArgSort. (line 26)
* SUN Disk Label, production: Bootable. (line 304)
* SUN SPARC boot images, activation: Bootable. (line 377)
* Symbolic link, create, -lns: Insert. (line 160)
* Symbolic link, create, -lns: Insert. (line 166)
* System area, _definition: Bootable. (line 184)
* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 278)
* Table-of-content, show, -toc: Inquiry. (line 27)
@ -5584,46 +5598,46 @@ Node: ArgSort26629
Node: AqDrive28123
Node: Loading31178
Node: Insert51283
Node: SetInsert61508
Node: Manip70359
Node: CmdFind80142
Node: Filter98445
Node: Writing103067
Node: SetWrite113222
Node: Bootable136167
Node: Jigdo158695
Node: Charset162954
Node: Exception166281
Node: DialogCtl172410
Node: Inquiry175012
Node: Navigate183462
Node: Verify191757
Node: Restore201634
Node: Emulation210247
Node: Scripting220657
Node: Frontend228439
Node: Examples238074
Node: ExDevices239252
Node: ExCreate239913
Node: ExDialog241213
Node: ExGrowing242484
Node: ExModifying243293
Node: ExBootable243803
Node: ExCharset244358
Node: ExPseudo245254
Node: ExCdrecord246181
Node: ExMkisofs246501
Node: ExGrowisofs247858
Node: ExException249012
Node: ExTime249470
Node: ExIncBackup249928
Node: ExRestore253954
Node: ExRecovery254900
Node: Files255472
Node: Seealso256806
Node: Bugreport257521
Node: Legal258112
Node: CommandIdx259124
Node: ConceptIdx276166
Node: SetInsert61867
Node: Manip71186
Node: CmdFind80969
Node: Filter99272
Node: Writing103894
Node: SetWrite114049
Node: Bootable136994
Node: Jigdo159522
Node: Charset163781
Node: Exception167108
Node: DialogCtl173237
Node: Inquiry175839
Node: Navigate184289
Node: Verify192584
Node: Restore202461
Node: Emulation211074
Node: Scripting221484
Node: Frontend229266
Node: Examples238901
Node: ExDevices240079
Node: ExCreate240740
Node: ExDialog242040
Node: ExGrowing243311
Node: ExModifying244120
Node: ExBootable244630
Node: ExCharset245185
Node: ExPseudo246081
Node: ExCdrecord247008
Node: ExMkisofs247328
Node: ExGrowisofs248685
Node: ExException249839
Node: ExTime250297
Node: ExIncBackup250755
Node: ExRestore254781
Node: ExRecovery255727
Node: Files256299
Node: Seealso257633
Node: Bugreport258348
Node: Legal258939
Node: CommandIdx259951
Node: ConceptIdx276993

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.4.3, Nov 29, 2015"
@c man .TH XORRISO 1 "Version 1.4.3, Dec 08, 2015"
@c man .\" Please adjust this date whenever revising the manpage.
@c man .\"
@c man .\" Some roff macros, for reference:
@ -1425,13 +1425,21 @@ Default is "ls".
Insert the given files or directory trees from filesystem
into the ISO image.
@*
If -pathspecs is set to "on" then pattern expansion is always disabled and
character '=' has a special meaning. It separates the ISO image path
from the disk path:
If -pathspecs is set to "on" or "as_mkisofs" then pattern expansion is always
disabled and character '=' has a special meaning. It separates the ISO image
path from the disk path:
@*
iso_rr_path=disk_path
@*
The separator '=' can be escaped by '\'.
Character '=' in the iso_rr_path must be escaped by '\' (i.e. as "\=").
@*
With -pathspecs "on", the character '\' must not be escaped. The character '='
in the disk_path must not be escaped.
@*
With -pathspecs "as_mkisofs", all characters '\' must be escaped in both,
iso_rr_path and disk_path. The character '=' may or may not be escaped
in the disk_path.
@*
If iso_rr_path does not begin with '/' then -cd is prepended.
If disk_path does not begin with '/' then -cdx is prepended.
@*
@ -1786,19 +1794,29 @@ cause exponential workload before their loops get detected.
The number given with "limit=" can curb this workload at the risk of truncating
an intentional sequence of link hops.
@c man .TP
@item -pathspecs "on"|"off"
@item -pathspecs "on"|"off"|"as_mkisofs"
@kindex -pathspecs sets meaning of = with -add
@cindex Insert, meaning of = with -add, -pathspecs
Control parameter interpretation with @command{xorriso}
actions -add and -path_list.
@*
@cindex Pathspec, _definition
"on" enables pathspecs of the form
@strong{target=source}
like with program mkisofs -graft-points.
It also disables -disk_pattern expansion for command -add.
Mode "as_mkisofs" enables pathspecs of the form
@*
"off" disables pathspecs of the form target=source
@strong{iso_rr_path=disk_path}
@*
like with program mkisofs -graft-points.
@*
All characters '\' must be escaped in both, iso_rr_path and disk_path.
The character '=' must be escaped in the iso_rr_path and
may or may not be escaped in the disk_path.
This mode temporarily disables -disk_pattern expansion for command -add.
@*
Mode "on" does nearly the same. But '=' must only be escaped in the iso_rr_path
and '\' must not be escaped at all. This has the disadvantage that one
cannot express an iso_rr_path which ends by '\'.
@*
Mode "off" disables pathspecs of the form target=source
and re-enables -disk_pattern expansion.
@c man .TP
@item -overwrite "on"|"nondir"|"off"

View File

@ -528,7 +528,12 @@ struct XorrisO { /* the global context of xorriso */
char loaded_boot_cat_path[SfileadrL];
/* XORRISO options */
int allow_graft_points;
int allow_graft_points; /* if not zero: yes
special options:
bit1= continue unescaping after first real '='
(as mkisofs does,
but xorriso did not for years)
*/
int allow_restore; /* -2=disallowed until special mode "unblock"
-1=permanently disallowed

View File

@ -1 +1 @@
#define Xorriso_timestamP "2015.11.29.082702"
#define Xorriso_timestamP "2015.12.09.132636"