storage: Delete extra wrap after vol-resize error

This patch is to delete the extra wrap "\n" after failed vol-resize
error for both "Failed to change size of volume to" and "Failed to change
size of volume by". For error with wrap, there will be an extra wrap
between two errors, such as:

   (1)# virsh vol-resize --pool default --vol vol-test 5M
        error: Failed to change size of volume 'vol-test' to 5M

        error: invalid argument: Can't shrink capacity below current capacity unless shrink flag explicitly specified

   (2)# virsh vol-resize /var/lib/libvirt/images/volds --shrink --delta 10M
        error: Failed to change size of volume 'volds' by 10M

        error: invalid argument: can't shrink capacity below existing allocation
This commit is contained in:
Yanqiu Zhang 2016-08-25 10:49:55 +08:00 committed by John Ferlan
parent b871b78986
commit ed8ba91ef2

View File

@ -1128,8 +1128,8 @@ cmdVolResize(vshControl *ctl, const vshCmd *cmd)
ret = true;
} else {
vshError(ctl,
delta ? _("Failed to change size of volume '%s' by %s\n")
: _("Failed to change size of volume '%s' to %s\n"),
delta ? _("Failed to change size of volume '%s' by %s")
: _("Failed to change size of volume '%s' to %s"),
virStorageVolGetName(vol), capacityStr);
ret = false;
}