Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
tests/vcpupin | 1 -
tools/virsh-domain.c | 75 +++++++++++++++++-----------------------------------
2 files changed, 24 insertions(+), 52 deletions(-)
diff --git a/tests/vcpupin b/tests/vcpupin
index a616216..638f62b 100755
--- a/tests/vcpupin
+++ b/tests/vcpupin
@@ -35,7 +35,6 @@ $abs_top_builddir/tools/virsh --connect test:///default vcpupin test a 0,1 > out
test $? = 1 || fail=1
cat <<\EOF > exp || fail=1
error: Unable to parse integer parameter to --vcpu
-error: vcpupin: Invalid or missing vCPU number.
EOF
compare exp out || fail=1
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 73414f8..6e1eb17 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -1120,7 +1120,7 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)
goto cleanup;
if ((rv = vshCommandOptULongLong(cmd, "total-bytes-sec", &value)) < 0) {
- goto interror;
+ goto error;
} else if (rv > 0) {
if (virTypedParamsAddULLong(¶ms, &nparams, &maxparams,
VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_BYTES_SEC,
@@ -1129,7 +1129,7 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)
}
if ((rv = vshCommandOptULongLong(cmd, "read-bytes-sec", &value)) < 0) {
- goto interror;
+ goto error;
} else if (rv > 0) {
if (virTypedParamsAddULLong(¶ms, &nparams, &maxparams,
VIR_DOMAIN_BLOCK_IOTUNE_READ_BYTES_SEC,
@@ -1138,7 +1138,7 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)
}
if ((rv = vshCommandOptULongLong(cmd, "write-bytes-sec", &value)) < 0) {
- goto interror;
+ goto error;
} else if (rv > 0) {
if (virTypedParamsAddULLong(¶ms, &nparams, &maxparams,
VIR_DOMAIN_BLOCK_IOTUNE_WRITE_BYTES_SEC,
@@ -1147,7 +1147,7 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)
}
if ((rv = vshCommandOptULongLong(cmd, "total-iops-sec", &value)) < 0) {
- goto interror;
+ goto error;
} else if (rv > 0) {
if (virTypedParamsAddULLong(¶ms, &nparams, &maxparams,
VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_IOPS_SEC,
@@ -1156,7 +1156,7 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)
}
if ((rv = vshCommandOptULongLong(cmd, "read-iops-sec", &value)) < 0) {
- goto interror;
+ goto error;
} else if (rv > 0) {
if (virTypedParamsAddULLong(¶ms, &nparams, &maxparams,
VIR_DOMAIN_BLOCK_IOTUNE_READ_IOPS_SEC,
@@ -1165,7 +1165,7 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)
}
if ((rv = vshCommandOptULongLong(cmd, "write-iops-sec", &value)) < 0) {
- goto interror;
+ goto error;
} else if (rv > 0) {
if (virTypedParamsAddULLong(¶ms, &nparams, &maxparams,
VIR_DOMAIN_BLOCK_IOTUNE_WRITE_IOPS_SEC,
@@ -1216,10 +1216,6 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)
error:
vshError(ctl, "%s", _("Unable to change block I/O throttle"));
goto cleanup;
-
- interror:
- vshError(ctl, "%s", _("Unable to parse integer parameter"));
- goto cleanup;
}