提交 7f913c82 编写于 作者: J Ján Tomko

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
上级 70bc623b
......@@ -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 "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册