提交 0d6e8341 编写于 作者: J John Ferlan

virsh: Clear vsh last error during virshCommandOptVolBy

https://bugzilla.redhat.com/show_bug.cgi?id=1529256

If one of the virStorageVolLookupBy{Key|Name|Path} succeeds and
we have a @vol, then clear the last libvirt error; otherwise, a
subsequent "other" failure may cause vshReportError to erroneously
report the wrong error as well as a reported 'vshError' error that
caused the failure.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 3527f9dd
......@@ -129,6 +129,8 @@ virshCommandOptVolBy(vshControl *ctl, const vshCmd *cmd,
else
vshError(ctl, _("failed to get vol '%s', specifying --%s "
"might help"), n, pooloptname);
} else {
vshResetLibvirtError();
}
/* If the pool was specified, then make sure that the returned
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册