Enabled speed display with command -extract
This commit is contained in:
parent
67836d9721
commit
661ae74800
@ -543,7 +543,7 @@ int Xorriso_option_extract(struct XorrisO *xorriso, char *iso_path,
|
||||
|
||||
if(!(flag&2))
|
||||
Xorriso_pacifier_callback(xorriso, "files restored",xorriso->pacifier_count,
|
||||
xorriso->pacifier_total, "", 1|4);
|
||||
xorriso->pacifier_total, "", 1 | 4 | 8 | 32);
|
||||
if(ret <= 0 || problem_count > 0)
|
||||
goto ex;
|
||||
|
||||
|
@ -596,7 +596,7 @@ int Xorriso_tree_restore_node(struct XorrisO *xorriso, IsoNode *node,
|
||||
xorriso->pacifier_byte_count - last_p_count >= 128*1024) {
|
||||
Xorriso_pacifier_callback(xorriso, "files restored",
|
||||
xorriso->pacifier_count,
|
||||
xorriso->pacifier_total, "", 2|4);
|
||||
xorriso->pacifier_total, "", 2 | 4 | 8);
|
||||
last_p_count= xorriso->pacifier_byte_count;
|
||||
}
|
||||
}
|
||||
@ -1044,7 +1044,7 @@ went_well:;
|
||||
if(!(flag&2))
|
||||
Xorriso_pacifier_callback(xorriso, "files restored",
|
||||
xorriso->pacifier_count,
|
||||
xorriso->pacifier_total, "", 4);
|
||||
xorriso->pacifier_total, "", 4 | 8);
|
||||
ret= 1;
|
||||
ex:;
|
||||
if(split_parts!=NULL)
|
||||
|
@ -2020,6 +2020,7 @@ int Xorriso_pacifier_callback(struct XorrisO *xorriso, char *what_done,
|
||||
double current_time, since, interval_time, speed, speed_factor;
|
||||
char count_text[80], byte_text[80], profile_name[80], *speed_unit;
|
||||
int ret, profile_number;
|
||||
off_t amount;
|
||||
|
||||
current_time= Sfile_microtime(0);
|
||||
interval_time= current_time - xorriso->last_update_time;
|
||||
@ -2056,13 +2057,17 @@ int Xorriso_pacifier_callback(struct XorrisO *xorriso, char *what_done,
|
||||
(flag & (8 | 64)) ? "s" : "seconds");
|
||||
}
|
||||
speed= -1.0;
|
||||
if(flag & 4)
|
||||
amount= xorriso->pacifier_byte_count;
|
||||
else
|
||||
amount= count;
|
||||
if((flag & 8)) {
|
||||
if(flag & 32) {
|
||||
if(since > 0)
|
||||
speed= count / since;
|
||||
} else if(count >= xorriso->pacifier_prev_count) {
|
||||
speed= amount / since;
|
||||
} else if(amount >= xorriso->pacifier_prev_count) {
|
||||
if(interval_time > 0)
|
||||
speed= (count - xorriso->pacifier_prev_count) / interval_time;
|
||||
speed= (amount - xorriso->pacifier_prev_count) / interval_time;
|
||||
}
|
||||
}
|
||||
if(speed >= 0.0) {
|
||||
@ -2082,7 +2087,7 @@ int Xorriso_pacifier_callback(struct XorrisO *xorriso, char *what_done,
|
||||
sprintf(xorriso->info_text+strlen(xorriso->info_text), " %s %.1fx%s",
|
||||
(flag & 32 ? "=" : ","), speed / speed_factor, speed_unit);
|
||||
}
|
||||
xorriso->pacifier_prev_count= count;
|
||||
xorriso->pacifier_prev_count= amount;
|
||||
if(current_object[0]!=0)
|
||||
sprintf(xorriso->info_text+strlen(xorriso->info_text),
|
||||
", now at %s", current_object);
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2012.02.14.103256"
|
||||
#define Xorriso_timestamP "2012.02.25.154938"
|
||||
|
Loading…
Reference in New Issue
Block a user