1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

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
(cherry picked from commit 7f913c8254beb1d243f80754db3a1498657fba84)
This commit is contained in:
Ján Tomko 2013-03-22 12:32:32 +01:00
parent 66e8f041f9
commit 7d6abdec6d

View File

@ -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 "