1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

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.
This commit is contained in:
Ryota Ozaki 2011-10-24 20:44:04 +09:00 committed by Eric Blake
parent 279084537f
commit 6b5c9936ec

View File

@ -15216,8 +15216,8 @@ vshCommandOptVolBy(vshControl *ctl, const vshCmd *cmd,
if (pool) if (pool)
vshError(ctl, _("failed to get vol '%s'"), n); vshError(ctl, _("failed to get vol '%s'"), n);
else else
vshError(ctl, _("failed to get vol '%s', specifying --pool " vshError(ctl, _("failed to get vol '%s', specifying --%s "
"might help"), n); "might help"), n, pooloptname);
} }
if (pool) if (pool)