diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index 8257ed560f5fadcc5bb2a7aca34db67f445365e2..a1d3b42b484d6624f49088a3a9e6689b8a89a680 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -1707,7 +1707,7 @@ openvzDomainGetBarrierLimit(virDomainPtr domain, virCommandSetOutputBuffer(cmd, &output); virCommandAddArgFormat(cmd, "-o%s.b,%s.l", param, param); virCommandAddArg(cmd, domain->name); - if (virCommandRun(cmd, &status)) { + if (virCommandRun(cmd, &status) < 0 || status != 0) { virReportError(VIR_ERR_OPERATION_FAILED, _("Failed to get %s for %s: %d"), param, domain->name, status); @@ -1758,7 +1758,7 @@ openvzDomainSetBarrierLimit(virDomainPtr domain, virCommandAddArgFormat(cmd, "--%s", param); virCommandAddArgFormat(cmd, "%llu:%llu", barrier, limit); virCommandAddArg(cmd, "--save"); - if (virCommandRun(cmd, &status)) { + if (virCommandRun(cmd, &status) < 0 || status != 0) { virReportError(VIR_ERR_OPERATION_FAILED, _("Failed to set %s for %s: %d"), param, domain->name, status);