From c3e18c13ca26b792855610f335d3dcf3859de4c1 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Mon, 25 Nov 2019 17:24:42 +0100 Subject: [PATCH] virsh: Implement VIR_DOMAIN_JOB_DISK_TEMP_(USED|TOTAL) in cmdDomjobinfo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Krempa Reviewed-by: Eric Blake Reviewed-by: Daniel P. Berrangé Reviewed-by: Ján Tomko --- tools/virsh-domain.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index c2cfcf409d..7a465fa583 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -6388,6 +6388,24 @@ cmdDomjobinfo(vshControl *ctl, const vshCmd *cmd) vshPrint(ctl, "%-17s %-13d\n", _("Auto converge throttle:"), ivalue); } + if ((rc = virTypedParamsGetULLong(params, nparams, + VIR_DOMAIN_JOB_DISK_TEMP_USED, + &value)) < 0) { + goto save_error; + } else if (rc) { + val = vshPrettyCapacity(value, &unit); + vshPrint(ctl, "%-17s %-.3lf %s\n", _("Temporary disk space use:"), val, unit); + } + + if ((rc = virTypedParamsGetULLong(params, nparams, + VIR_DOMAIN_JOB_DISK_TEMP_TOTAL, + &value)) < 0) { + goto save_error; + } else if (rc) { + val = vshPrettyCapacity(value, &unit); + vshPrint(ctl, "%-17s %-.3lf %s\n", _("Temporary disk space total:"), val, unit); + } + ret = true; cleanup: -- GitLab