提交 6b5c9936 编写于 作者: R Ryota Ozaki 提交者: Eric Blake

virsh: Fix error message on vol-create-from failure

If vol-create-from is failed due to 'input volume not found',
virsh outputs like this:
  $ sudo virsh vol-create-from testpool test-vol.xml test.img
  error: failed to get vol 'test.img', specifying --pool might help
  error: Storage volume not found: no storage vol with matching path
However, '--pool' is incorrect because it is already specified as
second argument ('testpool' in this case). It should be "--inputpool".

The patch fixes this by using pooloptname, which will be "inputpool"
in this case and "pool" in other cases, as error message.
上级 27908453
......@@ -15216,8 +15216,8 @@ vshCommandOptVolBy(vshControl *ctl, const vshCmd *cmd,
if (pool)
vshError(ctl, _("failed to get vol '%s'"), n);
else
vshError(ctl, _("failed to get vol '%s', specifying --pool "
"might help"), n);
vshError(ctl, _("failed to get vol '%s', specifying --%s "
"might help"), n, pooloptname);
}
if (pool)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册