New action estimate_size for -find and -findx

This commit is contained in:
2010-12-02 11:10:39 +00:00
parent f755fcd56d
commit dd5cd516d7
10 changed files with 121 additions and 40 deletions

View File

@ -1007,6 +1007,8 @@ not_enough_exec_arguments:;
goto sorry_ex;
}
Findjob_set_action_type(job, 39, type, 0);
} else if(strcmp(cpt, "estimate_size")==0) {
Findjob_set_action_target(job, 40, NULL, 0);
} else {
sprintf(xorriso->info_text, "-find -exec: unknown action %s",
Text_shellsafe(argv[i], sfe, 0));
@ -1041,6 +1043,15 @@ ex:;
xorriso->pacifier_count, 0, "", 1);
if(first_job->action == 35 && !(flag & 1))
Xorriso_report_md5_outcome(xorriso, first_job->target, 0);
if(first_job->action == 40) {
sprintf(xorriso->result_line,"Size lower : %lus\n",
(unsigned long) (job->estim_lower_size / (off_t) 2048));
Xorriso_result(xorriso,0);
sprintf(xorriso->result_line,"Size upper : %lus\n",
(unsigned long) ((job->estim_upper_size / (off_t) 2048) +
!!(job->estim_upper_size % 2048)));
Xorriso_result(xorriso,0);
}
if(access_acl_text != NULL)
free(access_acl_text);
if(default_acl_text != NULL)