* Catch SIGPIPE signals which may arise when disconnection
* from libvirtd occurs
*/
-static int
+static void
vshSetupSignals(void) {
struct sigaction sig_action;
/*
* vshReconnect:
*
- * Reconnect after an
+ * Reconnect after a disconnect from libvirtd
*
*/
-static int
+static void
vshReconnect(vshControl *ctl) {
if (ctl->conn != NULL)
virConnectClose(ctl->conn);
{
virDomainJobInfo info;
virDomainPtr dom;
- int ret = TRUE, autostart;
- unsigned int id;
- char *str, uuid[VIR_UUID_STRING_BUFLEN];
+ int ret = TRUE;
if (!vshConnectionUsability(ctl, ctl->conn, TRUE))
return FALSE;
{
virDomainPtr dom;
int ret = TRUE;
- unsigned int id;
- char *str, uuid[VIR_UUID_STRING_BUFLEN];
if (!vshConnectionUsability(ctl, ctl->conn, TRUE))
return FALSE;
if (virDomainAbortJob(dom) < 0)
ret = FALSE;
-cleanup:
virDomainFree(dom);
return ret;
}
}
if (ret != 0) {
- vshError(ctl, _("Failed to attach interface"));
+ vshError(ctl, "%s", _("Failed to attach interface"));
ret = FALSE;
} else {
vshPrint(ctl, "%s", _("Interface attached successfully\n"));
}
if (ret != 0) {
- vshError(ctl, _("Failed to detach interface"));
+ vshError(ctl, "%s", _("Failed to detach interface"));
ret = FALSE;
} else {
vshPrint(ctl, "%s", _("Interface detached successfully\n"));
}
if (ret != 0) {
- vshError(ctl, _("Failed to attach disk"));
+ vshError(ctl, "%s", _("Failed to attach disk"));
ret = FALSE;
} else {
vshPrint(ctl, "%s", _("Disk attached successfully\n"));
}
if (ret != 0) {
- vshError(ctl, _("Failed to detach disk"));
+ vshError(ctl, "%s", _("Failed to detach disk"));
ret = FALSE;
} else {
vshPrint(ctl, "%s", _("Disk detached successfully\n"));
if (doc == NULL)
goto no_memory;
- res = xmlParseBalancedChunkMemory(doc, NULL, NULL, 0, buffer, &node_list);
+ res = xmlParseBalancedChunkMemory(doc, NULL, NULL, 0,
+ (const xmlChar *)buffer, &node_list);
if (res != 0) {
vshError(ctl, _("Failed to parse XML fragment %s"), from);
ret = FALSE;