[PATCH] virsh: Fix regression of vol-resize

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

 



Introduced by commit 1daa4ba33acf. vshCommandOptStringReq returns
0 on *success* or the option is not required && not present, both
are right result. Error out when returning 0 is not correct.
---
 tools/virsh-volume.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c
index a222cca..e16a385 100644
--- a/tools/virsh-volume.c
+++ b/tools/virsh-volume.c
@@ -1076,7 +1076,7 @@ cmdVolResize(vshControl *ctl, const vshCmd *cmd)
     if (!(vol = vshCommandOptVol(ctl, cmd, "vol", "pool", NULL)))
         return false;
 
-    if (vshCommandOptStringReq(ctl, cmd, "capacity", &capacityStr) <= 0)
+    if (vshCommandOptStringReq(ctl, cmd, "capacity", &capacityStr) < 0)
         goto cleanup;
     virSkipSpaces(&capacityStr);
     if (*capacityStr == '-') {
-- 
1.8.1.4

--
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]