New -findx -type "m" for active mount points

This commit is contained in:
Thomas Schmitt 2008-03-07 07:53:59 +00:00
parent 63de67672e
commit a5ea9f79a0
3 changed files with 17 additions and 5 deletions

View File

@ -2515,7 +2515,7 @@ int Findjob_set_name_expr(struct FindjoB *o, char *name_expr, int flag)
int Findjob_set_file_type(struct FindjoB *o, char file_type, int flag) int Findjob_set_file_type(struct FindjoB *o, char file_type, int flag)
{ {
static char known[]= {"bcdpf-lsX"}; static char known[]= {"bcdpf-lsmX"};
if(file_type!=0) if(file_type!=0)
if(strchr(known, file_type)==NULL) if(strchr(known, file_type)==NULL)
@ -2551,7 +2551,12 @@ int Findjob_test(struct FindjoB *o, char *name,
if(o->file_type!='c') if(o->file_type!='c')
return(0); return(0);
} else if(S_ISDIR(stbuf->st_mode)) { } else if(S_ISDIR(stbuf->st_mode)) {
if(o->file_type!='d') if(o->file_type=='m') {
if(boss_stbuf==NULL)
return(0);
if(boss_stbuf->st_dev == stbuf->st_dev)
return(0);
} else if(o->file_type!='d')
return(0); return(0);
} else if(S_ISFIFO(stbuf->st_mode)) { } else if(S_ISFIFO(stbuf->st_mode)) {
if(o->file_type!='p') if(o->file_type!='p')
@ -3305,6 +3310,7 @@ int Xorriso_pacifier_callback(struct XorrisO *xorriso, char *what_done,
int flag) int flag)
{ {
double current_time, since; double current_time, since;
char count_text[80];
current_time= Sfile_microtime(0); current_time= Sfile_microtime(0);
if(current_time - xorriso->last_update_time < xorriso->pacifier_interval if(current_time - xorriso->last_update_time < xorriso->pacifier_interval
@ -3318,8 +3324,12 @@ int Xorriso_pacifier_callback(struct XorrisO *xorriso, char *what_done,
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"Thank you for being patient since %.f seconds", since); "Thank you for being patient since %.f seconds", since);
} else if(todo<=0.0) { } else if(todo<=0.0) {
if(count<10000000)
sprintf(count_text, "%.f", (double) count);
else
Sfile_scale((double) count, count_text, 7, 1e5, 1);
sprintf(xorriso->info_text, sprintf(xorriso->info_text,
"%.f %s in %.f seconds", (double) count, what_done, since); "%s %s in %.f seconds", count_text, what_done, since);
} else { } else {
sprintf(xorriso->info_text, "%.f of %.f %s in %.f seconds", sprintf(xorriso->info_text, "%.f of %.f %s in %.f seconds",
(double) count, (double) todo, what_done, since); (double) count, (double) todo, what_done, since);
@ -4520,7 +4530,7 @@ int Xorriso_find_compare(struct XorrisO *xorriso, void *boss_iter,
follow_links= (xorriso->do_follow_links || follow_links= (xorriso->do_follow_links ||
(xorriso->do_follow_param && !(flag&2))) <<28; (xorriso->do_follow_param && !(flag&2))) <<28;
ret= Xorriso_compare_2_files(xorriso, disk_path, iso_path, adrc, &result, ret= Xorriso_compare_2_files(xorriso, disk_path, iso_path, adrc, &result,
2|follow_links|(1<<29)|((flag&1)<<31)); 2|follow_links|((!(flag&1))<<29)|((flag&1)<<31));
if(ret<xorriso->find_compare_result) if(ret<xorriso->find_compare_result)
xorriso->find_compare_result= ret; xorriso->find_compare_result= ret;
if(flag&1) { if(flag&1) {

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.03.06.174724" #define Xorriso_timestamP "2008.03.07.075325"

View File

@ -4091,6 +4091,8 @@ int Xorriso_findi(struct XorrisO *xorriso, struct FindjoB *job,
/* ??? This seems to be redundant with the single test above /* ??? This seems to be redundant with the single test above
??? Should i dive in unconditionally and leave out test and action here ? ??? Should i dive in unconditionally and leave out test and action here ?
??? Then do above test unconditionally ? ??? Then do above test unconditionally ?
--- Seems that the current configuration represents the special
handling of the find start path with mount points. Dangerous to change.
*/ */
ret= Findjob_test(job, name, dir_stbuf, &stbuf, depth, 0); ret= Findjob_test(job, name, dir_stbuf, &stbuf, depth, 0);
if(ret<0) if(ret<0)