if (ret == -2) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("total throughput limit must be an integer"));
- goto error;
+ return -1;
} else if (ret < 0) {
def->blkdeviotune.total_bytes_sec = 0;
}
if (ret == -2) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("read throughput limit must be an integer"));
- goto error;
+ return -1;
} else if (ret < 0) {
def->blkdeviotune.read_bytes_sec = 0;
}
if (ret == -2) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("write throughput limit must be an integer"));
- goto error;
+ return -1;
} else if (ret < 0) {
def->blkdeviotune.write_bytes_sec = 0;
}
if (ret == -2) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("total I/O operations limit must be an integer"));
- goto error;
+ return -1;
} else if (ret < 0) {
def->blkdeviotune.total_iops_sec = 0;
}
if (ret == -2) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("read I/O operations limit must be an integer"));
- goto error;
+ return -1;
} else if (ret < 0) {
def->blkdeviotune.read_iops_sec = 0;
}
if (ret == -2) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("write I/O operations limit must be an integer"));
- goto error;
+ return -1;
} else if (ret < 0) {
def->blkdeviotune.write_iops_sec = 0;
}
virReportError(VIR_ERR_XML_ERROR, "%s",
_("total and read/write bytes_sec "
"cannot be set at the same time"));
- goto error;
+ return -1;
}
if ((def->blkdeviotune.total_iops_sec &&
virReportError(VIR_ERR_XML_ERROR, "%s",
_("total and read/write iops_sec "
"cannot be set at the same time"));
- goto error;
+ return -1;
}
if ((def->blkdeviotune.total_bytes_sec_max &&
virReportError(VIR_ERR_XML_ERROR, "%s",
_("total and read/write bytes_sec_max "
"cannot be set at the same time"));
- goto error;
+ return -1;
}
if ((def->blkdeviotune.total_iops_sec_max &&
virReportError(VIR_ERR_XML_ERROR, "%s",
_("total and read/write iops_sec_max "
"cannot be set at the same time"));
- goto error;
+ return -1;
}
return 0;
-
- error:
- return ret;
}