Add reencryption progress function.

This commit is contained in:
Ondrej Kozina
2019-03-29 19:58:22 +01:00
parent a7f80a2770
commit 64f59ff71e
2 changed files with 17 additions and 0 deletions

View File

@@ -592,3 +592,19 @@ int tools_is_stdin(const char *key_file)
return strcmp(key_file, "-") ? 0 : 1;
}
int tools_reencrypt_progress(uint64_t size, uint64_t offset, void *usrptr)
{
static struct timeval start_time = {}, end_time = {};
int r = 0;
tools_time_progress(size, offset, &start_time, &end_time);
check_signal(&r);
if (r) {
tools_clear_line();
log_err("\nReencrypt interrupted.");
}
return r;
}