[libvirt] [PATCH 7/7] virsh-volume: Adapt to new error reporting
Michal Privoznik
mprivozn at redhat.com
Wed Apr 2 12:44:00 UTC 2014
Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
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
More information about the libvir-list
mailing list