[PATCH] Delete extra wrap after vol-reisize error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch is to delete the extra wrap "\n" after failed vol-reisize error, 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
---
 tools/virsh-volume.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c
index d35fee1..4b3b4d7 100644
--- a/tools/virsh-volume.c
+++ b/tools/virsh-volume.c
@@ -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;
     }
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]