New -find actions update_merge, rm_merge, clear_merge. -cp_clone now merges.

This commit is contained in:
2011-02-12 17:14:23 +00:00
parent 2c37215969
commit 7f01cfd5dc
18 changed files with 435 additions and 116 deletions

View File

@ -875,15 +875,22 @@ not_enough_exec_arguments:;
job= new_job;
} else if(strcmp(cpt, "compare")==0 || strcmp(cpt, "update")==0 ||
strcmp(cpt, "widen_hardlinks")==0) {
strcmp(cpt, "widen_hardlinks")==0 ||
strcmp(cpt, "update_merge")==0) {
if(i+1>=end_idx)
goto not_enough_exec_arguments;
i++;
action= 14;
if(strcmp(cpt, "update")==0)
action= 17;
if(strcmp(cpt, "widen_hardlinks")==0)
else if(strcmp(cpt, "widen_hardlinks")==0)
action= 32;
else if(strcmp(cpt, "update_merge") == 0) {
action= 41;
/* Enter update_merge mode for node adding */
xorriso->update_flags|= 1;
}
ret= Xorriso_make_abs_adr(xorriso, xorriso->wdx, argv[i],
other_path_start, 1|2|4|8);
if(ret<=0)
@ -1009,6 +1016,12 @@ not_enough_exec_arguments:;
Findjob_set_action_type(job, 39, type, 0);
} else if(strcmp(cpt, "estimate_size")==0) {
Findjob_set_action_target(job, 40, NULL, 0);
} else if(strcmp(cpt, "rm_merge")==0) {
Findjob_set_action_target(job, 42, NULL, 0);
xorriso->update_flags&= ~1; /* End update_merge mode for node adding */
} else if(strcmp(cpt, "clear_merge")==0) {
Findjob_set_action_target(job, 43, NULL, 0);
xorriso->update_flags&= ~1; /* End update_merge mode for node adding */
} else {
sprintf(xorriso->info_text, "-find -exec: unknown action %s",
Text_shellsafe(argv[i], sfe, 0));