From: Ján Tomko Date: Fri, 22 Mar 2013 11:32:32 +0000 (+0100) Subject: virsh: don't print --(null) in vol-name and vol-pool X-Git-Tag: v1.0.4-rc1~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f913c8254beb1d243f80754db3a1498657fba84;p=thirdparty%2Flibvirt.git virsh: don't print --(null) in vol-name and vol-pool Don't print the pool option name if it's null. Before: virsh # vol-name vol error: failed to get vol 'vol', specifying --(null) might help error: Storage volume not found: no storage vol with matching path vol After: virsh # vol-name vol error: failed to get vol 'vol' error: Storage volume not found: no storage vol with matching path vol Bug: https://bugzilla.redhat.com/show_bug.cgi?id=924571 --- diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c index 89ad8ea216..0ca295f3cd 100644 --- a/tools/virsh-volume.c +++ b/tools/virsh-volume.c @@ -88,7 +88,7 @@ vshCommandOptVolBy(vshControl *ctl, const vshCmd *cmd, } if (!vol) { - if (pool) + if (pool || !pooloptname) vshError(ctl, _("failed to get vol '%s'"), n); else vshError(ctl, _("failed to get vol '%s', specifying --%s "