Sketched split file scheme with partno,totalparts,offset,count,totalsize

This commit is contained in:
2008-03-11 11:35:04 +00:00
parent 358b159b83
commit 47eb5a285e
3 changed files with 60 additions and 8 deletions

View File

@ -4107,14 +4107,17 @@ int Xorriso_set_time(struct XorrisO *xorriso, char *in_path, time_t t,
/* @param flag bit0= not a command parameter (directory iteration or recursion)
bit1= do not count deleted files with rm and rm_r
@return <=0 error, 1=ok, 2=ok, node has been deleted
@return <=0 error,
1=ok
2=ok, node has been deleted,
3=ok, do not dive into directory (e.g. because it is a split file)
*/
int Xorriso_findi_action(struct XorrisO *xorriso, struct FindjoB *job,
IsoDirIter *boss_iter, off_t boss_mem,
char *abs_path, char *show_path,
IsoNode *node, int depth, int flag)
{
int ret= 0, type, action= 0, hflag, deleted= 0;
int ret= 0, type, action= 0, hflag, deleted= 0, no_dive= 0;
uid_t user= 0;
gid_t group= 0;
time_t date= 0;
@ -4164,6 +4167,8 @@ int Xorriso_findi_action(struct XorrisO *xorriso, struct FindjoB *job,
iso_prefix, target, (action==17)|((flag&1)<<1));
if(ret==2)
deleted= 1;
if(ret==3)
no_dive= 1;
if(ret>=0)
ret= 1;
} else if(action==16 || action==18) { /* not_in_iso , add_missing */
@ -4177,6 +4182,8 @@ int Xorriso_findi_action(struct XorrisO *xorriso, struct FindjoB *job,
return(ret);
if(deleted)
return(2);
if(no_dive)
return(3);
return(1);
}
@ -4190,7 +4197,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;
int ret, action= 0, hflag, deleted= 0, no_dive= 0;
IsoDirIter *iter= NULL;
IsoDir *dir_node= NULL;
IsoNode *node, *iso_node;
@ -4253,9 +4260,11 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job,
deleted= 1;
goto ex;
}
if(ret==3)
no_dive= 1;
}
}
if(!LIBISO_ISDIR((IsoNode *) dir_node))
if(no_dive || !LIBISO_ISDIR((IsoNode *) dir_node))
{ret= 1; goto ex;}
mem= boss_mem;
@ -4303,13 +4312,14 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job,
abs_path, path, node, depth, 1|(flag&2));
if(ret==2) /* node has been deleted */
continue;
no_dive= (ret==3);
if(ret<=0) {
if(Xorriso_eval_problem_status(xorriso, ret, 1|2)<0)
goto ex;
}
}
if(S_ISDIR(stbuf.st_mode)) {
if(S_ISDIR(stbuf.st_mode) && !no_dive) {
ret= Xorriso_findi(xorriso, job, (void *) iter, mem,
(void *) node, path, &stbuf, depth+1, flag|1);
if(ret<0)