mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
virsh-domain: rename print_job_progress to vshPrintJobProgress
This commit is contained in:
parent
745aa55fbf
commit
8c725cc10d
@ -1452,7 +1452,7 @@ cleanup:
|
||||
}
|
||||
|
||||
static void
|
||||
print_job_progress(const char *label, unsigned long long remaining,
|
||||
vshPrintJobProgress(const char *label, unsigned long long remaining,
|
||||
unsigned long long total)
|
||||
{
|
||||
int progress;
|
||||
@ -1624,7 +1624,7 @@ cmdBlockCommit(vshControl *ctl, const vshCmd *cmd)
|
||||
break;
|
||||
|
||||
if (verbose)
|
||||
print_job_progress(_("Block Commit"),
|
||||
vshPrintJobProgress(_("Block Commit"),
|
||||
info.end - info.cur, info.end);
|
||||
|
||||
GETTIMEOFDAY(&curr);
|
||||
@ -1650,7 +1650,7 @@ cmdBlockCommit(vshControl *ctl, const vshCmd *cmd)
|
||||
|
||||
if (verbose && !quit) {
|
||||
/* printf [100 %] */
|
||||
print_job_progress(_("Block Commit"), 0, 1);
|
||||
vshPrintJobProgress(_("Block Commit"), 0, 1);
|
||||
}
|
||||
vshPrint(ctl, "\n%s", quit ? _("Commit aborted") : _("Commit complete"));
|
||||
|
||||
@ -1818,7 +1818,7 @@ cmdBlockCopy(vshControl *ctl, const vshCmd *cmd)
|
||||
break;
|
||||
|
||||
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)
|
||||
break;
|
||||
|
||||
@ -1961,7 +1961,7 @@ cmdBlockJob(vshControl *ctl, const vshCmd *cmd)
|
||||
break;
|
||||
}
|
||||
|
||||
print_job_progress(type, info.end - info.cur, info.end);
|
||||
vshPrintJobProgress(type, info.end - info.cur, info.end);
|
||||
if (info.bandwidth != 0)
|
||||
vshPrint(ctl, _(" Bandwidth limit: %lu MiB/s\n"), info.bandwidth);
|
||||
return true;
|
||||
@ -2095,7 +2095,7 @@ cmdBlockPull(vshControl *ctl, const vshCmd *cmd)
|
||||
break;
|
||||
|
||||
if (verbose)
|
||||
print_job_progress(_("Block Pull"), info.end - info.cur, info.end);
|
||||
vshPrintJobProgress(_("Block Pull"), info.end - info.cur, info.end);
|
||||
|
||||
GETTIMEOFDAY(&curr);
|
||||
if (intCaught || (timeout &&
|
||||
@ -2120,7 +2120,7 @@ cmdBlockPull(vshControl *ctl, const vshCmd *cmd)
|
||||
|
||||
if (verbose && !quit) {
|
||||
/* printf [100 %] */
|
||||
print_job_progress(_("Block Pull"), 0, 1);
|
||||
vshPrintJobProgress(_("Block Pull"), 0, 1);
|
||||
}
|
||||
vshPrint(ctl, "\n%s", quit ? _("Pull aborted") : _("Pull complete"));
|
||||
|
||||
@ -3553,7 +3553,7 @@ repoll:
|
||||
retchar == '0') {
|
||||
if (verbose) {
|
||||
/* print [100 %] */
|
||||
print_job_progress(label, 0, 1);
|
||||
vshPrintJobProgress(label, 0, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -3588,7 +3588,7 @@ repoll:
|
||||
ret = virDomainGetJobInfo(dom, &jobinfo);
|
||||
pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL);
|
||||
if (ret == 0)
|
||||
print_job_progress(label, jobinfo.dataRemaining,
|
||||
vshPrintJobProgress(label, jobinfo.dataRemaining,
|
||||
jobinfo.dataTotal);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user