提交 8c725cc1 编写于 作者: P Peter Krempa

virsh-domain: rename print_job_progress to vshPrintJobProgress

上级 745aa55f
...@@ -1452,7 +1452,7 @@ cleanup: ...@@ -1452,7 +1452,7 @@ cleanup:
} }
static void static void
print_job_progress(const char *label, unsigned long long remaining, vshPrintJobProgress(const char *label, unsigned long long remaining,
unsigned long long total) unsigned long long total)
{ {
int progress; int progress;
...@@ -1624,7 +1624,7 @@ cmdBlockCommit(vshControl *ctl, const vshCmd *cmd) ...@@ -1624,7 +1624,7 @@ cmdBlockCommit(vshControl *ctl, const vshCmd *cmd)
break; break;
if (verbose) if (verbose)
print_job_progress(_("Block Commit"), vshPrintJobProgress(_("Block Commit"),
info.end - info.cur, info.end); info.end - info.cur, info.end);
GETTIMEOFDAY(&curr); GETTIMEOFDAY(&curr);
...@@ -1650,7 +1650,7 @@ cmdBlockCommit(vshControl *ctl, const vshCmd *cmd) ...@@ -1650,7 +1650,7 @@ cmdBlockCommit(vshControl *ctl, const vshCmd *cmd)
if (verbose && !quit) { if (verbose && !quit) {
/* printf [100 %] */ /* printf [100 %] */
print_job_progress(_("Block Commit"), 0, 1); vshPrintJobProgress(_("Block Commit"), 0, 1);
} }
vshPrint(ctl, "\n%s", quit ? _("Commit aborted") : _("Commit complete")); vshPrint(ctl, "\n%s", quit ? _("Commit aborted") : _("Commit complete"));
...@@ -1818,7 +1818,7 @@ cmdBlockCopy(vshControl *ctl, const vshCmd *cmd) ...@@ -1818,7 +1818,7 @@ cmdBlockCopy(vshControl *ctl, const vshCmd *cmd)
break; break;
if (verbose) if (verbose)
print_job_progress(_("Block Copy"), info.end - info.cur, info.end); vshPrintJobProgress(_("Block Copy"), info.end - info.cur, info.end);
if (info.cur == info.end) if (info.cur == info.end)
break; break;
...@@ -1961,7 +1961,7 @@ cmdBlockJob(vshControl *ctl, const vshCmd *cmd) ...@@ -1961,7 +1961,7 @@ cmdBlockJob(vshControl *ctl, const vshCmd *cmd)
break; break;
} }
print_job_progress(type, info.end - info.cur, info.end); vshPrintJobProgress(type, info.end - info.cur, info.end);
if (info.bandwidth != 0) if (info.bandwidth != 0)
vshPrint(ctl, _(" Bandwidth limit: %lu MiB/s\n"), info.bandwidth); vshPrint(ctl, _(" Bandwidth limit: %lu MiB/s\n"), info.bandwidth);
return true; return true;
...@@ -2095,7 +2095,7 @@ cmdBlockPull(vshControl *ctl, const vshCmd *cmd) ...@@ -2095,7 +2095,7 @@ cmdBlockPull(vshControl *ctl, const vshCmd *cmd)
break; break;
if (verbose) if (verbose)
print_job_progress(_("Block Pull"), info.end - info.cur, info.end); vshPrintJobProgress(_("Block Pull"), info.end - info.cur, info.end);
GETTIMEOFDAY(&curr); GETTIMEOFDAY(&curr);
if (intCaught || (timeout && if (intCaught || (timeout &&
...@@ -2120,7 +2120,7 @@ cmdBlockPull(vshControl *ctl, const vshCmd *cmd) ...@@ -2120,7 +2120,7 @@ cmdBlockPull(vshControl *ctl, const vshCmd *cmd)
if (verbose && !quit) { if (verbose && !quit) {
/* printf [100 %] */ /* printf [100 %] */
print_job_progress(_("Block Pull"), 0, 1); vshPrintJobProgress(_("Block Pull"), 0, 1);
} }
vshPrint(ctl, "\n%s", quit ? _("Pull aborted") : _("Pull complete")); vshPrint(ctl, "\n%s", quit ? _("Pull aborted") : _("Pull complete"));
...@@ -3553,7 +3553,7 @@ repoll: ...@@ -3553,7 +3553,7 @@ repoll:
retchar == '0') { retchar == '0') {
if (verbose) { if (verbose) {
/* print [100 %] */ /* print [100 %] */
print_job_progress(label, 0, 1); vshPrintJobProgress(label, 0, 1);
} }
break; break;
} }
...@@ -3588,7 +3588,7 @@ repoll: ...@@ -3588,7 +3588,7 @@ repoll:
ret = virDomainGetJobInfo(dom, &jobinfo); ret = virDomainGetJobInfo(dom, &jobinfo);
pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL); pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL);
if (ret == 0) if (ret == 0)
print_job_progress(label, jobinfo.dataRemaining, vshPrintJobProgress(label, jobinfo.dataRemaining,
jobinfo.dataTotal); jobinfo.dataTotal);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册