{NULL, 0, 0, NULL}
};
-static bool
+static int
cmdSchedInfoUpdate(vshControl *ctl, const vshCmd *cmd,
virSchedParameterPtr param)
{
int nparams = 0;
int update = 0;
int i, ret;
- int ret_val = false;
+ bool ret_val = false;
if (!vshConnectionUsability(ctl, ctl->conn))
return false;
static bool
cmdFreecell(vshControl *ctl, const vshCmd *cmd)
{
- int func_ret = false;
+ bool func_ret = false;
int ret;
int cell = -1, cell_given;
unsigned long long memory;
virDomainPtr dom = NULL;
int p[2] = {-1, -1};
int ret = -1;
+ bool functionReturn = false;
virThread workerThread;
struct pollfd pollfd;
char retchar;
if (ret > 0) {
if (saferead(p[0], &retchar, sizeof(retchar)) > 0) {
if (retchar == '0') {
- ret = true;
+ functionReturn = true;
if (verbose) {
/* print [100 %] */
print_job_progress(0, 1);
}
} else
- ret = false;
+ functionReturn = false;
} else
- ret = false;
+ functionReturn = false;
break;
}
if (errno == EINTR) {
if (intCaught) {
virDomainAbortJob(dom);
- ret = false;
intCaught = 0;
} else
goto repoll;
}
+ functionReturn = false;
break;
}
virDomainFree(dom);
VIR_FORCE_CLOSE(p[0]);
VIR_FORCE_CLOSE(p[1]);
- return ret;
+ return functionReturn;
}
/*
{
virStoragePoolInfo info;
char **poolNames = NULL;
- int i, functionReturn, ret;
+ int i, ret;
+ bool functionReturn;
int numActivePools = 0, numInactivePools = 0, numAllPools = 0;
size_t stringLength = 0, nameStrLength = 0;
size_t autostartStrLength = 0, persistStrLength = 0;
double val;
int details = vshCommandOptBool(cmd, "details");
int numVolumes = 0, i;
- int ret, functionReturn;
+ int ret;
+ bool functionReturn;
int stringLength = 0;
size_t allocStrLength = 0, capStrLength = 0;
size_t nameStrLength = 0, pathStrLength = 0;
virDomainPtr dom;
const char *from = NULL;
char *buffer;
- bool ret = true;
+ int ret;
unsigned int flags;
if (!vshConnectionUsability(ctl, ctl->conn))
virDomainPtr dom;
const char *from = NULL;
char *buffer;
- bool ret = true;
+ int ret;
unsigned int flags;
if (!vshConnectionUsability(ctl, ctl->conn))
virDomainPtr dom;
const char *from = NULL;
char *buffer;
- bool ret = true;
+ int ret;
unsigned int flags;
if (!vshConnectionUsability(ctl, ctl->conn))
const char *mac = NULL, *target = NULL, *script = NULL,
*type = NULL, *source = NULL, *model = NULL;
int typ;
- bool ret = false;
+ int ret;
+ bool functionReturn = false;
unsigned int flags;
virBuffer buf = VIR_BUFFER_INITIALIZER;
char *xml;
if (virBufferError(&buf)) {
vshPrint(ctl, "%s", _("Failed to allocate XML buffer"));
- return false;
+ goto cleanup;
}
xml = virBufferContentAndReset(&buf);
if (ret != 0) {
vshError(ctl, "%s", _("Failed to attach interface"));
- ret = false;
} else {
vshPrint(ctl, "%s", _("Interface attached successfully\n"));
- ret = true;
+ functionReturn = true;
}
cleanup:
if (dom)
virDomainFree(dom);
virBufferFreeAndReset(&buf);
- return ret;
+ return functionReturn;
}
/*
char *doc;
char buf[64];
int i = 0, diff_mac;
- bool ret = false;
+ int ret;
+ int functionReturn = false;
unsigned int flags;
if (!vshConnectionUsability(ctl, ctl->conn))
if (ret != 0) {
vshError(ctl, "%s", _("Failed to detach interface"));
- ret = false;
} else {
vshPrint(ctl, "%s", _("Interface detached successfully\n"));
- ret = true;
+ functionReturn = true;
}
cleanup:
xmlFreeDoc(xml);
if (xml_buf)
xmlBufferFree(xml_buf);
- return ret;
+ return functionReturn;
}
/*
virDomainPtr dom = NULL;
const char *source = NULL, *target = NULL, *driver = NULL,
*subdriver = NULL, *type = NULL, *mode = NULL;
- bool isFile = false, ret = false;
+ bool isFile = false, functionReturn = false;
+ int ret;
unsigned int flags;
const char *stype = NULL;
virBuffer buf = VIR_BUFFER_INITIALIZER;
if (ret != 0) {
vshError(ctl, "%s", _("Failed to attach disk"));
- ret = false;
} else {
vshPrint(ctl, "%s", _("Disk attached successfully\n"));
- ret = true;
+ functionReturn = true;
}
cleanup:
if (dom)
virDomainFree(dom);
virBufferFreeAndReset(&buf);
- return ret;
+ return functionReturn;
}
/*
const char *target = NULL;
char *doc;
int i = 0, diff_tgt;
- bool ret = false;
+ int ret;
+ bool functionReturn = false;
unsigned int flags;
if (!vshConnectionUsability(ctl, ctl->conn))
if (ret != 0) {
vshError(ctl, "%s", _("Failed to detach disk"));
- ret = false;
} else {
vshPrint(ctl, "%s", _("Disk detached successfully\n"));
- ret = true;
+ functionReturn = true;
}
cleanup:
xmlBufferFree(xml_buf);
if (dom)
virDomainFree(dom);
- return ret;
+ return functionReturn;
}
/*