Restricted split part recognition to directories with a complete part set
This commit is contained in:
parent
8ec9dd6a05
commit
dec92c32cc
@ -2,7 +2,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 "Sep 25, 2009"
|
||||
.TH XORRISO 1 "Sep 27, 2009"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
@ -152,10 +152,8 @@ not altered. Pending alteration can be revoked by command -rollback.
|
||||
Writing a session to the target is supposed to be very expensive in terms of
|
||||
time and of consumed space on appendable or write-once media. Therefore all
|
||||
intended manipulations of a particular ISO image should be done in a single
|
||||
session.
|
||||
.br
|
||||
In some special situations (e.g. in a file-to-file situation) it can be
|
||||
useful to store intermediate states and to continue with image manipulations.
|
||||
session. But in principle it is possible
|
||||
to store intermediate states and to continue with image manipulations.
|
||||
.SS
|
||||
.B Media types and states:
|
||||
There are two families of media in the MMC standard:
|
||||
@ -173,9 +171,8 @@ be emulated. Else only a single overall session will be visible.
|
||||
DVD-RW media can be formatted by -format full.
|
||||
They can be made unformatted by -blank deformat.
|
||||
.br
|
||||
Emulated drives are handled as overwriteable media if they are random
|
||||
read-write accessible. If they are only sequentially writeable then
|
||||
they are handled as blank multi-session media.
|
||||
Regular files and block devices are handled as overwriteable media.
|
||||
Pipes and other writeable file types are handled as blank multi-session media.
|
||||
.PP
|
||||
These media can assume several states in which they offer different
|
||||
capabilities.
|
||||
@ -188,7 +185,7 @@ With used CD-RW and DVD-RW it can be achieved by action -blank "as_needed".
|
||||
Overwriteable media are considered blank if they are new or if they have
|
||||
been marked as blank by xorriso.
|
||||
Action -blank "as_needed" can be used to do this marking on overwriteable
|
||||
media, or to apply eventual mandatory formatting of new media.
|
||||
media, or to apply eventual mandatory formatting to new media.
|
||||
.br
|
||||
\fBAppendable\fR media accept further sessions. Either they are MMC
|
||||
multi-session media in appendable state, or they are overwriteable media
|
||||
@ -405,6 +402,7 @@ according to entry "group::". xorriso brings "group::" into effect before
|
||||
eventually removing the ACL from a file.
|
||||
.PP
|
||||
.B xattr
|
||||
(aka EA)
|
||||
are pairs of name and value which can be attached to file objects. AAIP is
|
||||
able to represent them and xorriso allows to record and restore pairs which
|
||||
have names out of the user namespace. I.e. those which begin with "user.",
|
||||
@ -414,7 +412,8 @@ xattr processing happens only if it is enabled by option
|
||||
.B -xattr.
|
||||
.br
|
||||
As with ACL, currently only xorriso is able to retrieve xattr from AAIP
|
||||
enhanced images and to restore them to xattr capable file systems.
|
||||
enhanced images, to restore them to xattr capable file systems, or to print
|
||||
them.
|
||||
.SS
|
||||
.B Command processing:
|
||||
.br
|
||||
@ -994,10 +993,11 @@ E.g:
|
||||
.br
|
||||
/file/part_3_of_3_at_4094m_with_2047m_of_5753194821
|
||||
.br
|
||||
While option -split_size is set larger than 0 such file pieces will be
|
||||
recognized by their peculiar names. They get handled by options -compare* and
|
||||
-update*. In overwrite situations the common parent directory will be handled
|
||||
like a regular file, if it contains exactly one complete set of file parts.
|
||||
While option -split_size is set larger than 0, and if all pieces of a file
|
||||
reside in the same ISO directory with no other files, and if the names look
|
||||
like above, then their ISO directory will be recognized and handled like a
|
||||
regular file. This affects options -compare*, -update*, and overwrite
|
||||
situations.
|
||||
See option -split_size for details.
|
||||
.TP
|
||||
\fB\-cpr\fR disk_path [***] iso_rr_path
|
||||
@ -1793,17 +1793,14 @@ FAILURE event.
|
||||
A well tested -split_size is 2047m. Sizes above -file_size_limit are not
|
||||
permissible.
|
||||
.br
|
||||
While option -split_size is set larger than 0 such file pieces will be
|
||||
recognized and handled by options -compare* and -update*. In overwrite
|
||||
situations, the common parent directory will be handled like a regular file
|
||||
if it contains only one complete set of file parts.
|
||||
While option -split_size is set larger than 0 such a directory with split
|
||||
file pieces will be recognized and handled like a regular file by options
|
||||
-compare* , -update*, and in overwrite situations. There are -ossirox
|
||||
options "concat_split_on" and "concat_split_off" which control the handling
|
||||
when files get restored to disk.
|
||||
.br
|
||||
In order to be recognizable, the names of the part files have to follow
|
||||
a convention:
|
||||
.br
|
||||
A disk file gets mapped to an ISO directory containing its split parts
|
||||
as regular files. The parts have names which describe the splitting
|
||||
by 5 numbers
|
||||
In order to be recognizable, the names of the part files have to
|
||||
describe the splitting by 5 numbers:
|
||||
.br
|
||||
part_number,total_parts,byte_offset,byte_count,disk_file_size
|
||||
.br
|
||||
@ -1816,16 +1813,9 @@ All digits are interpreted as decimal, even if leading zeros are present.
|
||||
.br
|
||||
E.g: /file/part_1_of_3_at_0_with_2047m_of_5753194821
|
||||
.br
|
||||
For -update* and -compar* not all parts have to be present on the same media.
|
||||
But those parts which are present have to sit in the same directory.
|
||||
No other files are allowed in there. Parts have to be disjoint. Their numbers
|
||||
have to be plausible. E.g. byte_count must be valid as -cut_out argument
|
||||
and it must be the same with all parts.
|
||||
.br
|
||||
If the disk file grows enough to need new parts then those get added
|
||||
to the directory if it already contains all parts of the old disk file.
|
||||
If not all parts are present, then only those present parts will
|
||||
be updated.
|
||||
No other files are allowed in the directory. All parts have to be present and
|
||||
their numbers have to be plausible. E.g. byte_count must be valid as -cut_out
|
||||
argument and their contents may not overlap.
|
||||
.TP
|
||||
.B Settings for result writing:
|
||||
.TP
|
||||
@ -3630,7 +3620,7 @@ The default setting of -check_media abort_file= is:
|
||||
.br
|
||||
.SH SEE ALSO
|
||||
.TP
|
||||
For mounting xorriso generated ISO 9660 images
|
||||
For mounting xorriso generated ISO 9660 images (-t iso9660)
|
||||
.br
|
||||
.BR mount(8)
|
||||
.TP
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2009.09.27.080401"
|
||||
#define Xorriso_timestamP "2009.09.28.173322"
|
||||
|
@ -8026,6 +8026,8 @@ int Xorriso_findi_test(struct XorrisO *xorriso, struct FindjoB *job,
|
||||
|
||||
/* @param flag bit0= recursion
|
||||
bit1= do not count deleted files with rm and rm_r
|
||||
bit2= do not dive into split file directories
|
||||
(implicitly given with actions 14=compare and 17=update)
|
||||
@return <=0 error, 1= ok , 2= dir node and path has been deleted
|
||||
*/
|
||||
int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job,
|
||||
@ -8033,7 +8035,7 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job,
|
||||
void *dir_node_generic, char *dir_path,
|
||||
struct stat *dir_stbuf, int depth, int flag)
|
||||
{
|
||||
int ret, action= 0, hflag, deleted= 0, no_dive= 0, split_flag;
|
||||
int ret, action= 0, hflag, deleted= 0, no_dive= 0;
|
||||
IsoDirIter *iter= NULL;
|
||||
IsoDir *dir_node= NULL;
|
||||
IsoNode *node, *iso_node;
|
||||
@ -8128,11 +8130,9 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job,
|
||||
}
|
||||
if(no_dive || !LIBISO_ISDIR((IsoNode *) dir_node))
|
||||
{ret= 1; goto ex;}
|
||||
split_flag= 1 | 2;
|
||||
if(action == 14 || action == 17)
|
||||
split_flag &= ~2;
|
||||
if(Xorriso_is_split(xorriso, dir_path, (IsoNode *) dir_node, split_flag)>0)
|
||||
{ret= 1; goto ex;}
|
||||
if(action == 14 || action == 17 || (flag & 4))
|
||||
if(Xorriso_is_split(xorriso, dir_path, (IsoNode *) dir_node, 1)>0)
|
||||
{ret= 1; goto ex;}
|
||||
|
||||
mem= boss_mem;
|
||||
hflag= 1;
|
||||
@ -8354,7 +8354,7 @@ int Xorriso_path_from_lba(struct XorrisO *xorriso, IsoNode *node, int lba,
|
||||
int Xorriso_findi_sorted(struct XorrisO *xorriso, struct FindjoB *job,
|
||||
off_t boss_mem, int filec, char **filev, int flag)
|
||||
{
|
||||
int i, ret;
|
||||
int i, ret, find_flag= 0;
|
||||
struct FindjoB array_job, *proxy_job= NULL, *hindmost= NULL, *hmboss= NULL;
|
||||
struct stat dir_stbuf;
|
||||
IsoNode *node;
|
||||
@ -8363,6 +8363,8 @@ int Xorriso_findi_sorted(struct XorrisO *xorriso, struct FindjoB *job,
|
||||
|
||||
array_job.start_path= NULL;
|
||||
|
||||
if(job->action == 14 || job->action == 17)
|
||||
find_flag|= 4;
|
||||
if(job->action>=9 && job->action<=13) { /* actions which have own findjobs */
|
||||
/* array_job replaces the hindmost job in the chain */
|
||||
for(hindmost= job; hindmost->subjob != NULL; hindmost= hindmost->subjob)
|
||||
@ -8391,7 +8393,7 @@ int Xorriso_findi_sorted(struct XorrisO *xorriso, struct FindjoB *job,
|
||||
if(ret <= 0)
|
||||
goto ex;
|
||||
ret= Xorriso_findi(xorriso, proxy_job, NULL, boss_mem, NULL,
|
||||
filev[i], &dir_stbuf, 0, 0);
|
||||
filev[i], &dir_stbuf, 0, find_flag);
|
||||
if(ret <= 0)
|
||||
goto ex;
|
||||
}
|
||||
@ -8410,7 +8412,7 @@ int Xorriso_findi_sorted(struct XorrisO *xorriso, struct FindjoB *job,
|
||||
if(ret <= 0)
|
||||
goto ex;
|
||||
ret= Xorriso_findi(xorriso, job, NULL, boss_mem, NULL,
|
||||
filev[i], &dir_stbuf, 0, 0);
|
||||
filev[i], &dir_stbuf, 0, find_flag);
|
||||
if(ret <= 0)
|
||||
if(Xorriso_eval_problem_status(xorriso, ret, 1|2)<0)
|
||||
goto ex;
|
||||
@ -8440,7 +8442,7 @@ int Xorriso_findi_sorted(struct XorrisO *xorriso, struct FindjoB *job,
|
||||
if(ret <= 0)
|
||||
goto ex;
|
||||
ret= Xorriso_findi(xorriso, proxy_job, NULL, mem_needed, NULL,
|
||||
filev[i], &dir_stbuf, 0, 0);
|
||||
filev[i], &dir_stbuf, 0, find_flag);
|
||||
if(ret <= 0)
|
||||
goto ex;
|
||||
}
|
||||
@ -9238,8 +9240,7 @@ int Xorriso_iso_file_close(struct XorrisO *xorriso, void **stream, int flag)
|
||||
|
||||
|
||||
/* @param flag bit0= in_node is valid, do not resolve iso_adr
|
||||
bit1= insist in complete collection of part files
|
||||
??? <<< bit2= recognize and parse split parts despite
|
||||
bit2= recognize and parse split parts despite
|
||||
xorrio->split_size <= 0
|
||||
*/
|
||||
int Xorriso_identify_split(struct XorrisO *xorriso, char *iso_adr,
|
||||
@ -9262,10 +9263,6 @@ int Xorriso_identify_split(struct XorrisO *xorriso, char *iso_adr,
|
||||
*count= 0;
|
||||
*parts= NULL;
|
||||
|
||||
/* <<< remove bit1 and hardcode it
|
||||
flag|= 2;
|
||||
*/
|
||||
|
||||
if(xorriso->split_size <= 0 && !(flag & 4))
|
||||
return(0);
|
||||
|
||||
@ -9323,7 +9320,7 @@ cannot_iter:;
|
||||
{ret= 0; goto ex;}
|
||||
(*count)++;
|
||||
}
|
||||
if(*count <= 0 || (*count != first_total_parts && (flag & 2)))
|
||||
if(*count <= 0 || *count != first_total_parts)
|
||||
{ret= 0; goto ex;}
|
||||
|
||||
ret= Splitparts_new(parts, (*count)+1, 0); /* (have one end marker item) */
|
||||
@ -9366,7 +9363,7 @@ cannot_iter:;
|
||||
incomplete= 1;
|
||||
memcpy(total_stbuf, &first_stbuf, sizeof(struct stat));
|
||||
total_stbuf->st_size= total_bytes;
|
||||
ret= !(overlapping || ((flag&2)&&incomplete));
|
||||
ret= !(overlapping || incomplete);
|
||||
ex:;
|
||||
if(iter!=NULL)
|
||||
iso_dir_iter_free(iter);
|
||||
|
Loading…
x
Reference in New Issue
Block a user