]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Apply patch from Wandlei Huttel to add Run Time and suffix to Restored bytes
authorKern Sibbald <kern@sibbald.com>
Sun, 27 May 2018 10:23:47 +0000 (12:23 +0200)
committerKern Sibbald <kern@sibbald.com>
Sun, 27 May 2018 10:25:25 +0000 (12:25 +0200)
bacula/src/dird/restore.c

index 4a91446fa224fc4aef51b4ce4d8771b97ee048fb..022e9479b2f97d3687ad8a2833a69e7b73c450bd 100644 (file)
@@ -612,7 +612,7 @@ bool do_restore_init(JCR *jcr)
 void restore_cleanup(JCR *jcr, int TermCode)
 {
    char sdt[MAX_TIME_LENGTH], edt[MAX_TIME_LENGTH];
-   char ec1[30], ec2[30], ec3[30];
+   char ec1[30], ec2[30], ec3[30], ec4[30], elapsed[50];
    char term_code[100], fd_term_msg[100], sd_term_msg[100];
    const char *term_msg, *replace = _("N/A");
    int msg_type = M_INFO;
@@ -710,9 +710,10 @@ void restore_cleanup(JCR *jcr, int TermCode)
 "  Replace:                %s\n"
 "  Start time:             %s\n"
 "  End time:               %s\n"
+"  Elapsed time:           %s\n"
 "  Files Expected:         %s\n"
 "  Files Restored:         %s\n"
-"  Bytes Restored:         %s\n"
+"  Bytes Restored:         %s (%sB)\n"
 "  Rate:                   %.1f KB/s\n"
 "  FD Errors:              %d\n"
 "  FD termination status:  %s\n"
@@ -727,9 +728,10 @@ void restore_cleanup(JCR *jcr, int TermCode)
         replace,
         sdt,
         edt,
+        edit_utime(RunTime, elapsed, sizeof(elapsed)),
         edit_uint64_with_commas((uint64_t)jcr->ExpectedFiles, ec1),
         edit_uint64_with_commas((uint64_t)jcr->jr.JobFiles, ec2),
-        edit_uint64_with_commas(jcr->jr.JobBytes, ec3),
+        edit_uint64_with_commas(jcr->jr.JobBytes, ec3), edit_uint64_with_suffix(jcr->jr.JobBytes, ec4),
         (float)kbps,
         jcr->JobErrors,
         fd_term_msg,