Improved messages at the end of partially failed -extract runs

This commit is contained in:
2010-11-30 10:47:30 +00:00
parent 692a675329
commit 07c2bb8421
6 changed files with 25 additions and 14 deletions

View File

@ -1347,10 +1347,12 @@ ex:;
bit5= -extract_single: eventually do not insert directory tree
*/
int Xorriso_restore_sorted(struct XorrisO *xorriso, int count,
char **src_array, char **tgt_array, int flag)
char **src_array, char **tgt_array,
int *problem_count, int flag)
{
int i, ret, with_node_array= 0, hflag= 0, hret;
*problem_count= 0;
if(!(((xorriso->ino_behavior & 16) && xorriso->do_restore_sort_lba) ||
(xorriso->ino_behavior & 4) || (flag & 1))) {
ret= Xorriso_make_hln_array(xorriso, 0);
@ -1370,8 +1372,9 @@ int Xorriso_restore_sorted(struct XorrisO *xorriso, int count,
ret= Xorriso_restore(xorriso, src_array[i], tgt_array[i],
(off_t) 0, (off_t) 0, hflag);
if(ret <= 0) {
(*problem_count)++;
hret= Xorriso_eval_problem_status(xorriso, ret, 0);
if(ret < 0)
if(hret < 0)
goto ex;
}
with_node_array= 1;
@ -1392,8 +1395,9 @@ int Xorriso_restore_sorted(struct XorrisO *xorriso, int count,
ret= Xorriso_restore(xorriso, src_array[i], tgt_array[i],
(off_t) 0, (off_t) 0, 2 << 7);
if(ret <= 0) {
(*problem_count)++;
hret= Xorriso_eval_problem_status(xorriso, ret, 0);
if(ret < 0)
if(hret < 0)
goto ex;
}
}
@ -1411,6 +1415,7 @@ int Xorriso_restore_sorted(struct XorrisO *xorriso, int count,
ret= Xorriso_restore(xorriso, src_array[i], tgt_array[i],
(off_t) 0, (off_t) 0, 0);
if(ret <= 0) {
(*problem_count)++;
hret= Xorriso_eval_problem_status(xorriso, ret, flag & 32);
if(ret < 0)
goto ex;