[PATCH 7/7] virsh-volume: Adapt to new error reporting

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

 



Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 tools/virsh-volume.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c
index 55bf6f0..71ff3b1 100644
--- a/tools/virsh-volume.c
+++ b/tools/virsh-volume.c
@@ -658,15 +658,11 @@ cmdVolUpload(vshControl *ctl, const vshCmd *cmd)
     const char *name = NULL;
     unsigned long long offset = 0, length = 0;
 
-    if (vshCommandOptULongLong(cmd, "offset", &offset) < 0) {
-        vshError(ctl, _("Unable to parse integer"));
+    if (vshCommandOptULongLong(cmd, "offset", &offset) < 0)
         return false;
-    }
 
-    if (vshCommandOptULongLong(cmd, "length", &length) < 0) {
-        vshError(ctl, _("Unable to parse integer"));
+    if (vshCommandOptULongLong(cmd, "length", &length) < 0)
         return false;
-    }
 
     if (!(vol = vshCommandOptVol(ctl, cmd, "vol", "pool", &name))) {
         return false;
@@ -768,15 +764,11 @@ cmdVolDownload(vshControl *ctl, const vshCmd *cmd)
     unsigned long long offset = 0, length = 0;
     bool created = false;
 
-    if (vshCommandOptULongLong(cmd, "offset", &offset) < 0) {
-        vshError(ctl, _("Unable to parse integer"));
+    if (vshCommandOptULongLong(cmd, "offset", &offset) < 0)
         return false;
-    }
 
-    if (vshCommandOptULongLong(cmd, "length", &length) < 0) {
-        vshError(ctl, _("Unable to parse integer"));
+    if (vshCommandOptULongLong(cmd, "length", &length) < 0)
         return false;
-    }
 
     if (!(vol = vshCommandOptVol(ctl, cmd, "vol", "pool", &name)))
         return false;
-- 
1.9.0

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