mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
Indent top-level labels by one space in tools/
This commit is contained in:
parent
2dcdb7f654
commit
5d8793eebb
@ -389,7 +389,7 @@ vshRunConsole(vshControl *ctl,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virConsoleFree(con);
|
virConsoleFree(con);
|
||||||
|
|
||||||
/* Restore original signal handlers */
|
/* Restore original signal handlers */
|
||||||
@ -399,7 +399,7 @@ cleanup:
|
|||||||
sigaction(SIGHUP, &old_sighup, NULL);
|
sigaction(SIGHUP, &old_sighup, NULL);
|
||||||
sigaction(SIGPIPE, &old_sigpipe, NULL);
|
sigaction(SIGPIPE, &old_sigpipe, NULL);
|
||||||
|
|
||||||
resettty:
|
resettty:
|
||||||
/* Put STDIN back into the (sane?) state we found
|
/* Put STDIN back into the (sane?) state we found
|
||||||
it in before starting */
|
it in before starting */
|
||||||
vshTTYRestore(ctl);
|
vshTTYRestore(ctl);
|
||||||
|
@ -105,7 +105,7 @@ vshGetDomainDescription(vshControl *ctl, virDomainPtr dom, bool title,
|
|||||||
if (!desc)
|
if (!desc)
|
||||||
desc = vshStrdup(ctl, "");
|
desc = vshStrdup(ctl, "");
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(domxml);
|
VIR_FREE(domxml);
|
||||||
xmlXPathFreeContext(ctxt);
|
xmlXPathFreeContext(ctxt);
|
||||||
xmlFreeDoc(doc);
|
xmlFreeDoc(doc);
|
||||||
@ -370,7 +370,7 @@ cmdDomMemStat(vshControl *ctl, const vshCmd *cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -425,7 +425,7 @@ cmdDomblkinfo(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -547,7 +547,7 @@ cmdDomblklist(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(disks);
|
VIR_FREE(disks);
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
VIR_FREE(xml);
|
VIR_FREE(xml);
|
||||||
@ -648,7 +648,7 @@ cmdDomiflist(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(interfaces);
|
VIR_FREE(interfaces);
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
VIR_FREE(xml);
|
VIR_FREE(xml);
|
||||||
@ -760,7 +760,7 @@ cmdDomIfGetLink(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(desc);
|
VIR_FREE(desc);
|
||||||
VIR_FREE(state);
|
VIR_FREE(state);
|
||||||
VIR_FREE(interfaces);
|
VIR_FREE(interfaces);
|
||||||
@ -819,7 +819,7 @@ cmdDomControl(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshDomainControlStateToString(info.state));
|
vshDomainControlStateToString(info.state));
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1008,7 +1008,7 @@ cmdDomblkstat(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(params);
|
VIR_FREE(params);
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1087,7 +1087,7 @@ cmdDomIfstat(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1151,7 +1151,7 @@ cmdDomBlkError(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(disks);
|
VIR_FREE(disks);
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1350,7 +1350,7 @@ cmdDomstate(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshDomainStateToString(state));
|
vshDomainStateToString(state));
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1474,7 +1474,7 @@ vshDomainListCollect(vshControl *ctl, unsigned int flags)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
||||||
fallback:
|
fallback:
|
||||||
/* fall back to old method (0.9.12 and older) */
|
/* fall back to old method (0.9.12 and older) */
|
||||||
vshResetLibvirtError();
|
vshResetLibvirtError();
|
||||||
|
|
||||||
@ -1534,7 +1534,7 @@ fallback:
|
|||||||
/* truncate domains that weren't found */
|
/* truncate domains that weren't found */
|
||||||
deleted = (nids + nnames) - list->ndomains;
|
deleted = (nids + nnames) - list->ndomains;
|
||||||
|
|
||||||
filter:
|
filter:
|
||||||
/* filter list the list if the list was acquired by fallback means */
|
/* filter list the list if the list was acquired by fallback means */
|
||||||
for (i = 0; i < list->ndomains; i++) {
|
for (i = 0; i < list->ndomains; i++) {
|
||||||
dom = list->domains[i];
|
dom = list->domains[i];
|
||||||
@ -1610,14 +1610,14 @@ filter:
|
|||||||
/* the domain matched all filters, it may stay */
|
/* the domain matched all filters, it may stay */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
remove_entry:
|
remove_entry:
|
||||||
/* the domain has to be removed as it failed one of the filters */
|
/* the domain has to be removed as it failed one of the filters */
|
||||||
virDomainFree(list->domains[i]);
|
virDomainFree(list->domains[i]);
|
||||||
list->domains[i] = NULL;
|
list->domains[i] = NULL;
|
||||||
deleted++;
|
deleted++;
|
||||||
}
|
}
|
||||||
|
|
||||||
finished:
|
finished:
|
||||||
/* sort the list */
|
/* sort the list */
|
||||||
if (list->domains && list->ndomains)
|
if (list->domains && list->ndomains)
|
||||||
qsort(list->domains, list->ndomains, sizeof(*list->domains),
|
qsort(list->domains, list->ndomains, sizeof(*list->domains),
|
||||||
@ -1629,7 +1629,7 @@ finished:
|
|||||||
|
|
||||||
success = true;
|
success = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
for (i = 0; nnames != -1 && i < nnames; i++)
|
for (i = 0; nnames != -1 && i < nnames; i++)
|
||||||
VIR_FREE(names[i]);
|
VIR_FREE(names[i]);
|
||||||
|
|
||||||
@ -1838,7 +1838,7 @@ cmdList(vshControl *ctl, const vshCmd *cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
cleanup:
|
cleanup:
|
||||||
vshDomainListFree(list);
|
vshDomainListFree(list);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -243,7 +243,7 @@ cmdAttachDevice(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshPrint(ctl, "%s", _("Device attached successfully\n"));
|
vshPrint(ctl, "%s", _("Device attached successfully\n"));
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -939,7 +939,7 @@ cmdAttachInterface(vshControl *ctl, const vshCmd *cmd)
|
|||||||
functionReturn = true;
|
functionReturn = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return functionReturn;
|
return functionReturn;
|
||||||
@ -1205,19 +1205,19 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virTypedParamsFree(params, nparams);
|
virTypedParamsFree(params, nparams);
|
||||||
if (dom)
|
if (dom)
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
save_error:
|
save_error:
|
||||||
vshSaveLibvirtError();
|
vshSaveLibvirtError();
|
||||||
error:
|
error:
|
||||||
vshError(ctl, "%s", _("Unable to change block I/O throttle"));
|
vshError(ctl, "%s", _("Unable to change block I/O throttle"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
interror:
|
interror:
|
||||||
vshError(ctl, "%s", _("Unable to parse integer parameter"));
|
vshError(ctl, "%s", _("Unable to parse integer parameter"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -1417,14 +1417,14 @@ cmdBlkiotune(vshControl * ctl, const vshCmd * cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virTypedParamsFree(params, nparams);
|
virTypedParamsFree(params, nparams);
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
save_error:
|
save_error:
|
||||||
vshSaveLibvirtError();
|
vshSaveLibvirtError();
|
||||||
error:
|
error:
|
||||||
vshError(ctl, "%s", _("Unable to change blkio parameters"));
|
vshError(ctl, "%s", _("Unable to change blkio parameters"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -1507,7 +1507,7 @@ blockJobImpl(vshControl *ctl, const vshCmd *cmd,
|
|||||||
ret = virDomainBlockRebase(dom, path, base, bandwidth, flags);
|
ret = virDomainBlockRebase(dom, path, base, bandwidth, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (pdom && ret == 0)
|
if (pdom && ret == 0)
|
||||||
*pdom = dom;
|
*pdom = dom;
|
||||||
else if (dom)
|
else if (dom)
|
||||||
@ -1712,7 +1712,7 @@ cmdBlockCommit(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshPrint(ctl, "\n%s", quit ? _("Commit aborted") : _("Commit complete"));
|
vshPrint(ctl, "\n%s", quit ? _("Commit aborted") : _("Commit complete"));
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
cleanup:
|
cleanup:
|
||||||
if (dom)
|
if (dom)
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
if (blocking)
|
if (blocking)
|
||||||
@ -1907,7 +1907,7 @@ cmdBlockCopy(vshControl *ctl, const vshCmd *cmd)
|
|||||||
_("Now in mirroring phase"));
|
_("Now in mirroring phase"));
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
cleanup:
|
cleanup:
|
||||||
if (dom)
|
if (dom)
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
if (blocking)
|
if (blocking)
|
||||||
@ -2163,7 +2163,7 @@ cmdBlockPull(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshPrint(ctl, "\n%s", quit ? _("Pull aborted") : _("Pull complete"));
|
vshPrint(ctl, "\n%s", quit ? _("Pull aborted") : _("Pull complete"));
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
cleanup:
|
cleanup:
|
||||||
if (dom)
|
if (dom)
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
if (blocking)
|
if (blocking)
|
||||||
@ -2332,7 +2332,7 @@ cmdConsole(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = cmdRunConsole(ctl, dom, name, flags);
|
ret = cmdRunConsole(ctl, dom, name, flags);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -2473,7 +2473,7 @@ cmdDomIfSetLink(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshError(ctl, _("interface (%s: %s) not found"), element, iface);
|
vshError(ctl, _("interface (%s: %s) not found"), element, iface);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
hit:
|
hit:
|
||||||
/* find and modify/add link state node */
|
/* find and modify/add link state node */
|
||||||
/* try to find <link> element */
|
/* try to find <link> element */
|
||||||
cur = obj->nodesetval->nodeTab[i]->children;
|
cur = obj->nodesetval->nodeTab[i]->children;
|
||||||
@ -2516,7 +2516,7 @@ hit:
|
|||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
xmlXPathFreeObject(obj);
|
xmlXPathFreeObject(obj);
|
||||||
xmlXPathFreeContext(ctxt);
|
xmlXPathFreeContext(ctxt);
|
||||||
xmlFreeDoc(xml);
|
xmlFreeDoc(xml);
|
||||||
@ -2700,14 +2700,14 @@ cmdDomIftune(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virTypedParamsFree(params, nparams);
|
virTypedParamsFree(params, nparams);
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
save_error:
|
save_error:
|
||||||
vshSaveLibvirtError();
|
vshSaveLibvirtError();
|
||||||
error:
|
error:
|
||||||
vshError(ctl, "%s", _("Unable to set interface parameters"));
|
vshError(ctl, "%s", _("Unable to set interface parameters"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -2835,7 +2835,7 @@ cmdDomPMSuspend(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -2886,7 +2886,7 @@ cmdDomPMWakeup(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -3217,7 +3217,7 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
rc = virDomainUndefine(dom);
|
rc = virDomainUndefine(dom);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (rc == 0) {
|
if (rc == 0) {
|
||||||
vshPrint(ctl, _("Domain %s has been undefined\n"), name);
|
vshPrint(ctl, _("Domain %s has been undefined\n"), name);
|
||||||
ret = true;
|
ret = true;
|
||||||
@ -3254,7 +3254,7 @@ out:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(source);
|
VIR_FREE(source);
|
||||||
VIR_FREE(target);
|
VIR_FREE(target);
|
||||||
VIR_FREE(pool);
|
VIR_FREE(pool);
|
||||||
@ -3277,7 +3277,7 @@ cleanup:
|
|||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
vshReportError(ctl);
|
vshReportError(ctl);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -3374,7 +3374,7 @@ cmdStartGetFDs(vshControl *ctl,
|
|||||||
*nfdsret = nfds;
|
*nfdsret = nfds;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virStringFreeList(fdlist);
|
virStringFreeList(fdlist);
|
||||||
VIR_FREE(fds);
|
VIR_FREE(fds);
|
||||||
return -1;
|
return -1;
|
||||||
@ -3447,7 +3447,7 @@ cmdStart(vshControl *ctl, const vshCmd *cmd)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
started:
|
started:
|
||||||
vshPrint(ctl, _("Domain %s started\n"),
|
vshPrint(ctl, _("Domain %s started\n"),
|
||||||
virDomainGetName(dom));
|
virDomainGetName(dom));
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
@ -3457,7 +3457,7 @@ started:
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
VIR_FREE(fds);
|
VIR_FREE(fds);
|
||||||
return ret;
|
return ret;
|
||||||
@ -3561,9 +3561,9 @@ doSave(void *opaque)
|
|||||||
|
|
||||||
ret = '0';
|
ret = '0';
|
||||||
|
|
||||||
out:
|
out:
|
||||||
pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL);
|
pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL);
|
||||||
out_sig:
|
out_sig:
|
||||||
if (dom) virDomainFree(dom);
|
if (dom) virDomainFree(dom);
|
||||||
VIR_FREE(xml);
|
VIR_FREE(xml);
|
||||||
ignore_value(safewrite(data->writefd, &ret, sizeof(ret)));
|
ignore_value(safewrite(data->writefd, &ret, sizeof(ret)));
|
||||||
@ -3680,7 +3680,7 @@ vshWatchJob(vshControl *ctl,
|
|||||||
|
|
||||||
functionReturn = true;
|
functionReturn = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
sigaction(SIGINT, &old_sig_action, NULL);
|
sigaction(SIGINT, &old_sig_action, NULL);
|
||||||
vshTTYRestore(ctl);
|
vshTTYRestore(ctl);
|
||||||
return functionReturn;
|
return functionReturn;
|
||||||
@ -3727,7 +3727,7 @@ cmdSave(vshControl *ctl, const vshCmd *cmd)
|
|||||||
if (ret)
|
if (ret)
|
||||||
vshPrint(ctl, _("\nDomain %s saved to %s\n"), name, to);
|
vshPrint(ctl, _("\nDomain %s saved to %s\n"), name, to);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (dom)
|
if (dom)
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
@ -3780,7 +3780,7 @@ cmdSaveImageDumpxml(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshPrint(ctl, "%s", xml);
|
vshPrint(ctl, "%s", xml);
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(xml);
|
VIR_FREE(xml);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -3851,7 +3851,7 @@ cmdSaveImageDefine(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshPrint(ctl, _("State file %s updated.\n"), file);
|
vshPrint(ctl, _("State file %s updated.\n"), file);
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(xml);
|
VIR_FREE(xml);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -3925,7 +3925,7 @@ cmdSaveImageEdit(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshPrint(ctl, _("State file %s edited.\n"), file);
|
vshPrint(ctl, _("State file %s edited.\n"), file);
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4003,9 +4003,9 @@ doManagedsave(void *opaque)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = '0';
|
ret = '0';
|
||||||
out:
|
out:
|
||||||
pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL);
|
pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL);
|
||||||
out_sig:
|
out_sig:
|
||||||
if (dom)
|
if (dom)
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
ignore_value(safewrite(data->writefd, &ret, sizeof(ret)));
|
ignore_value(safewrite(data->writefd, &ret, sizeof(ret)));
|
||||||
@ -4049,7 +4049,7 @@ cmdManagedSave(vshControl *ctl, const vshCmd *cmd)
|
|||||||
if (ret)
|
if (ret)
|
||||||
vshPrint(ctl, _("\nDomain %s state saved by libvirt\n"), name);
|
vshPrint(ctl, _("\nDomain %s state saved by libvirt\n"), name);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
VIR_FORCE_CLOSE(p[0]);
|
VIR_FORCE_CLOSE(p[0]);
|
||||||
VIR_FORCE_CLOSE(p[1]);
|
VIR_FORCE_CLOSE(p[1]);
|
||||||
@ -4110,7 +4110,7 @@ cmdManagedSaveRemove(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -4252,7 +4252,7 @@ cmdSchedInfoUpdate(vshControl *ctl, const vshCmd *cmd,
|
|||||||
*update_params = params;
|
*update_params = params;
|
||||||
params = NULL;
|
params = NULL;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(set_field);
|
VIR_FREE(set_field);
|
||||||
virTypedParamsFree(params, nparams);
|
virTypedParamsFree(params, nparams);
|
||||||
return ret;
|
return ret;
|
||||||
@ -4437,7 +4437,7 @@ cmdRestore(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshPrint(ctl, _("Domain restored from %s\n"), from);
|
vshPrint(ctl, _("Domain restored from %s\n"), from);
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(xml);
|
VIR_FREE(xml);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -4571,9 +4571,9 @@ doDump(void *opaque)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = '0';
|
ret = '0';
|
||||||
out:
|
out:
|
||||||
pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL);
|
pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL);
|
||||||
out_sig:
|
out_sig:
|
||||||
if (dom)
|
if (dom)
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
ignore_value(safewrite(data->writefd, &ret, sizeof(ret)));
|
ignore_value(safewrite(data->writefd, &ret, sizeof(ret)));
|
||||||
@ -4620,7 +4620,7 @@ cmdDump(vshControl *ctl, const vshCmd *cmd)
|
|||||||
if (ret)
|
if (ret)
|
||||||
vshPrint(ctl, _("\nDomain %s dumped to %s\n"), name, to);
|
vshPrint(ctl, _("\nDomain %s dumped to %s\n"), name, to);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
VIR_FORCE_CLOSE(p[0]);
|
VIR_FORCE_CLOSE(p[0]);
|
||||||
VIR_FORCE_CLOSE(p[1]);
|
VIR_FORCE_CLOSE(p[1]);
|
||||||
@ -4760,7 +4760,7 @@ cmdScreenshot(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshPrint(ctl, _("Screenshot saved to %s, with type of %s"), file, mime);
|
vshPrint(ctl, _("Screenshot saved to %s, with type of %s"), file, mime);
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (!ret && created)
|
if (!ret && created)
|
||||||
unlink(file);
|
unlink(file);
|
||||||
if (generated)
|
if (generated)
|
||||||
@ -4895,7 +4895,7 @@ cmdShutdown(vshControl *ctl, const vshCmd *cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
cleanup:
|
cleanup:
|
||||||
if (dom)
|
if (dom)
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
virStringFreeList(modes);
|
virStringFreeList(modes);
|
||||||
@ -4976,7 +4976,7 @@ cmdReboot(vshControl *ctl, const vshCmd *cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
cleanup:
|
cleanup:
|
||||||
if (dom)
|
if (dom)
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
virStringFreeList(modes);
|
virStringFreeList(modes);
|
||||||
@ -5238,12 +5238,12 @@ cmdDomjobinfo(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
virTypedParamsFree(params, nparams);
|
virTypedParamsFree(params, nparams);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
save_error:
|
save_error:
|
||||||
vshSaveLibvirtError();
|
vshSaveLibvirtError();
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -5413,7 +5413,7 @@ vshCPUCountCollect(vshControl *ctl,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = count;
|
ret = count;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(def);
|
VIR_FREE(def);
|
||||||
xmlXPathFreeContext(ctxt);
|
xmlXPathFreeContext(ctxt);
|
||||||
xmlFreeDoc(xml);
|
xmlFreeDoc(xml);
|
||||||
@ -5492,7 +5492,7 @@ cmdVcpucount(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -5773,9 +5773,9 @@ vshParseCPUList(vshControl *ctl, const char *cpulist,
|
|||||||
|
|
||||||
return cpumap;
|
return cpumap;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
vshError(ctl, "%s", _("cpulist: Invalid format."));
|
vshError(ctl, "%s", _("cpulist: Invalid format."));
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cpumap);
|
VIR_FREE(cpumap);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -5887,7 +5887,7 @@ cmdVcpuPin(vshControl *ctl, const vshCmd *cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cpumap);
|
VIR_FREE(cpumap);
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
@ -6006,7 +6006,7 @@ cmdEmulatorPin(vshControl *ctl, const vshCmd *cmd)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cpumap);
|
VIR_FREE(cpumap);
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
@ -6124,7 +6124,7 @@ cmdSetvcpus(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -6214,7 +6214,7 @@ cmdCPUCompare(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(buffer);
|
VIR_FREE(buffer);
|
||||||
VIR_FREE(snippet);
|
VIR_FREE(snippet);
|
||||||
xmlXPathFreeContext(ctxt);
|
xmlXPathFreeContext(ctxt);
|
||||||
@ -6313,7 +6313,7 @@ cmdCPUBaseline(vshControl *ctl, const vshCmd *cmd)
|
|||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
xmlXPathFreeContext(ctxt);
|
xmlXPathFreeContext(ctxt);
|
||||||
xmlFreeDoc(xml);
|
xmlFreeDoc(xml);
|
||||||
VIR_FREE(result);
|
VIR_FREE(result);
|
||||||
@ -6327,7 +6327,7 @@ cleanup:
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
no_memory:
|
no_memory:
|
||||||
vshError(ctl, "%s", _("Out of memory"));
|
vshError(ctl, "%s", _("Out of memory"));
|
||||||
ret = false;
|
ret = false;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -6477,7 +6477,7 @@ cmdCPUStats(vshControl *ctl, const vshCmd *cmd)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
do_show_total:
|
do_show_total:
|
||||||
/* get supported num of parameter for total statistics */
|
/* get supported num of parameter for total statistics */
|
||||||
if ((nparams = virDomainGetCPUStats(dom, NULL, 0, -1, 1, flags)) < 0)
|
if ((nparams = virDomainGetCPUStats(dom, NULL, 0, -1, 1, flags)) < 0)
|
||||||
goto failed_stats;
|
goto failed_stats;
|
||||||
@ -6513,12 +6513,12 @@ do_show_total:
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virTypedParamsFree(params, nparams);
|
virTypedParamsFree(params, nparams);
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
failed_stats:
|
failed_stats:
|
||||||
vshError(ctl, _("Failed to retrieve CPU statistics for domain '%s'"),
|
vshError(ctl, _("Failed to retrieve CPU statistics for domain '%s'"),
|
||||||
virDomainGetName(dom));
|
virDomainGetName(dom));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -6611,7 +6611,7 @@ cmdCreate(vshControl *ctl, const vshCmd *cmd)
|
|||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(buffer);
|
VIR_FREE(buffer);
|
||||||
VIR_FREE(fds);
|
VIR_FREE(fds);
|
||||||
return ret;
|
return ret;
|
||||||
@ -6886,7 +6886,7 @@ cmdDesc(vshControl *ctl, const vshCmd *cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(desc_edited);
|
VIR_FREE(desc_edited);
|
||||||
VIR_FREE(desc);
|
VIR_FREE(desc);
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
@ -7047,7 +7047,7 @@ cmdMetadata(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -7188,7 +7188,7 @@ cmdSendKey(vshControl *ctl, const vshCmd *cmd)
|
|||||||
if (!(virDomainSendKey(dom, codeset, holdtime, keycodes, count, 0) < 0))
|
if (!(virDomainSendKey(dom, codeset, holdtime, keycodes, count, 0) < 0))
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -7264,7 +7264,7 @@ static int getSignalNumber(vshControl *ctl, const char *signame)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
signum = -1;
|
signum = -1;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(tmp);
|
VIR_FREE(tmp);
|
||||||
return signum;
|
return signum;
|
||||||
}
|
}
|
||||||
@ -7303,7 +7303,7 @@ cmdSendProcessSignal(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -7691,14 +7691,14 @@ cmdMemtune(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virTypedParamsFree(params, nparams);
|
virTypedParamsFree(params, nparams);
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
save_error:
|
save_error:
|
||||||
vshSaveLibvirtError();
|
vshSaveLibvirtError();
|
||||||
error:
|
error:
|
||||||
vshError(ctl, "%s", _("Unable to change memory parameters"));
|
vshError(ctl, "%s", _("Unable to change memory parameters"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -7841,14 +7841,14 @@ cmdNumatune(vshControl * ctl, const vshCmd * cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virTypedParamsFree(params, nparams);
|
virTypedParamsFree(params, nparams);
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
save_error:
|
save_error:
|
||||||
vshSaveLibvirtError();
|
vshSaveLibvirtError();
|
||||||
error:
|
error:
|
||||||
vshError(ctl, "%s", _("Unable to change numa parameters"));
|
vshError(ctl, "%s", _("Unable to change numa parameters"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -7942,7 +7942,7 @@ cmdQemuMonitorCommand(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(result);
|
VIR_FREE(result);
|
||||||
VIR_FREE(monitor_cmd);
|
VIR_FREE(monitor_cmd);
|
||||||
virJSONValueFree(pretty);
|
virJSONValueFree(pretty);
|
||||||
@ -8083,7 +8083,7 @@ cmdQemuMonitorEvent(vshControl *ctl, const vshCmd *cmd)
|
|||||||
if (data.count)
|
if (data.count)
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
vshEventCleanup(ctl);
|
vshEventCleanup(ctl);
|
||||||
if (eventId >= 0 &&
|
if (eventId >= 0 &&
|
||||||
virConnectDomainQemuMonitorEventDeregister(ctl->conn, eventId) < 0)
|
virConnectDomainQemuMonitorEventDeregister(ctl->conn, eventId) < 0)
|
||||||
@ -8141,7 +8141,7 @@ cmdQemuAttach(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshError(ctl, _("Failed to attach to pid %u"), pid_value);
|
vshError(ctl, _("Failed to attach to pid %u"), pid_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8265,7 +8265,7 @@ cmdQemuAgentCommand(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(result);
|
VIR_FREE(result);
|
||||||
VIR_FREE(guest_agent_cmd);
|
VIR_FREE(guest_agent_cmd);
|
||||||
if (dom)
|
if (dom)
|
||||||
@ -8407,7 +8407,7 @@ cmdLxcEnterNamespace(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(seclabel);
|
VIR_FREE(seclabel);
|
||||||
VIR_FREE(secmodel);
|
VIR_FREE(secmodel);
|
||||||
if (dom)
|
if (dom)
|
||||||
@ -8982,16 +8982,16 @@ doMigrate(void *opaque)
|
|||||||
virConnectClose(dconn);
|
virConnectClose(dconn);
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL);
|
pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL);
|
||||||
out_sig:
|
out_sig:
|
||||||
virTypedParamsFree(params, nparams);
|
virTypedParamsFree(params, nparams);
|
||||||
if (dom)
|
if (dom)
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
ignore_value(safewrite(data->writefd, &ret, sizeof(ret)));
|
ignore_value(safewrite(data->writefd, &ret, sizeof(ret)));
|
||||||
return;
|
return;
|
||||||
|
|
||||||
save_error:
|
save_error:
|
||||||
vshSaveLibvirtError();
|
vshSaveLibvirtError();
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -9051,7 +9051,7 @@ cmdMigrate(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
virThreadJoin(&workerThread);
|
virThreadJoin(&workerThread);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
VIR_FORCE_CLOSE(p[0]);
|
VIR_FORCE_CLOSE(p[0]);
|
||||||
VIR_FORCE_CLOSE(p[1]);
|
VIR_FORCE_CLOSE(p[1]);
|
||||||
@ -9106,7 +9106,7 @@ cmdMigrateSetMaxDowntime(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -9168,7 +9168,7 @@ cmdMigrateCompCache(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshPrint(ctl, _("Compression cache: %.3lf %s"), value, unit);
|
vshPrint(ctl, _("Compression cache: %.3lf %s"), value, unit);
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -9221,7 +9221,7 @@ cmdMigrateSetMaxSpeed(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -9265,7 +9265,7 @@ cmdMigrateGetMaxSpeed(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -9445,7 +9445,7 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(doc);
|
VIR_FREE(doc);
|
||||||
VIR_FREE(xpath);
|
VIR_FREE(xpath);
|
||||||
VIR_FREE(passwd);
|
VIR_FREE(passwd);
|
||||||
@ -9631,7 +9631,7 @@ cmdDomHostname(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshPrint(ctl, "%s\n", hostname);
|
vshPrint(ctl, "%s\n", hostname);
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(hostname);
|
VIR_FREE(hostname);
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
@ -9747,7 +9747,7 @@ vshNodeIsSuperset(xmlNodePtr n1, xmlNodePtr n2)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virBitmapFree(bitmap);
|
virBitmapFree(bitmap);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -9848,7 +9848,7 @@ cmdDetachDevice(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshPrint(ctl, "%s", _("Device detached successfully\n"));
|
vshPrint(ctl, "%s", _("Device detached successfully\n"));
|
||||||
funcRet = true;
|
funcRet = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(buffer);
|
VIR_FREE(buffer);
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return funcRet;
|
return funcRet;
|
||||||
@ -9950,7 +9950,7 @@ cmdUpdateDevice(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshPrint(ctl, "%s", _("Device updated successfully\n"));
|
vshPrint(ctl, "%s", _("Device updated successfully\n"));
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(buffer);
|
VIR_FREE(buffer);
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
@ -10104,7 +10104,7 @@ cmdDetachInterface(vshControl *ctl, const vshCmd *cmd)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
hit:
|
hit:
|
||||||
if (!(detach_xml = virXMLNodeToString(xml, matchNode))) {
|
if (!(detach_xml = virXMLNodeToString(xml, matchNode))) {
|
||||||
vshSaveLibvirtError();
|
vshSaveLibvirtError();
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -10122,7 +10122,7 @@ hit:
|
|||||||
functionReturn = true;
|
functionReturn = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(doc);
|
VIR_FREE(doc);
|
||||||
VIR_FREE(detach_xml);
|
VIR_FREE(detach_xml);
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
@ -10220,7 +10220,7 @@ vshFindDisk(const char *doc,
|
|||||||
|
|
||||||
vshError(NULL, _("No disk found whose source path or target is %s"), path);
|
vshError(NULL, _("No disk found whose source path or target is %s"), path);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
xmlXPathFreeObject(obj);
|
xmlXPathFreeObject(obj);
|
||||||
xmlXPathFreeContext(ctxt);
|
xmlXPathFreeContext(ctxt);
|
||||||
xmlFreeDoc(xml);
|
xmlFreeDoc(xml);
|
||||||
@ -10319,7 +10319,7 @@ vshPrepareDiskXML(xmlNodePtr disk_node,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(device_type);
|
VIR_FREE(device_type);
|
||||||
VIR_FREE(disk_type);
|
VIR_FREE(disk_type);
|
||||||
return ret;
|
return ret;
|
||||||
@ -11162,7 +11162,7 @@ cmdEvent(vshControl *ctl, const vshCmd *cmd)
|
|||||||
if (count)
|
if (count)
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
vshEventCleanup(ctl);
|
vshEventCleanup(ctl);
|
||||||
if (data) {
|
if (data) {
|
||||||
for (i = 0; i < (all ? VIR_DOMAIN_EVENT_ID_LAST : 1); i++) {
|
for (i = 0; i < (all ? VIR_DOMAIN_EVENT_ID_LAST : 1); i++) {
|
||||||
@ -11323,7 +11323,7 @@ cmdChangeMedia(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshPrint(ctl, _("succeeded to complete action %s on media\n"), action);
|
vshPrint(ctl, _("succeeded to complete action %s on media\n"), action);
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(doc);
|
VIR_FREE(doc);
|
||||||
xmlFreeNode(disk_node);
|
xmlFreeNode(disk_node);
|
||||||
VIR_FREE(disk_xml);
|
VIR_FREE(disk_xml);
|
||||||
@ -11386,7 +11386,7 @@ cmdDomFSTrim(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ do {
|
|||||||
if (!tmp)
|
if (!tmp)
|
||||||
goto edit_cleanup;
|
goto edit_cleanup;
|
||||||
|
|
||||||
reedit:
|
reedit:
|
||||||
/* Start the editor. */
|
/* Start the editor. */
|
||||||
if (vshEditFile(ctl, tmp) == -1)
|
if (vshEditFile(ctl, tmp) == -1)
|
||||||
goto edit_cleanup;
|
goto edit_cleanup;
|
||||||
@ -96,7 +96,7 @@ reedit:
|
|||||||
EDIT_NOT_CHANGED;
|
EDIT_NOT_CHANGED;
|
||||||
}
|
}
|
||||||
|
|
||||||
redefine:
|
redefine:
|
||||||
msg = NULL;
|
msg = NULL;
|
||||||
|
|
||||||
/* Now re-read the object XML. Did someone else change it while
|
/* Now re-read the object XML. Did someone else change it while
|
||||||
@ -144,7 +144,7 @@ redefine:
|
|||||||
|
|
||||||
edit_success = true;
|
edit_success = true;
|
||||||
|
|
||||||
edit_cleanup:
|
edit_cleanup:
|
||||||
VIR_FREE(doc);
|
VIR_FREE(doc);
|
||||||
VIR_FREE(doc_edited);
|
VIR_FREE(doc_edited);
|
||||||
VIR_FREE(doc_reread);
|
VIR_FREE(doc_reread);
|
||||||
|
@ -182,7 +182,7 @@ cmdFreecell(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
xmlXPathFreeContext(ctxt);
|
xmlXPathFreeContext(ctxt);
|
||||||
xmlFreeDoc(xml);
|
xmlFreeDoc(xml);
|
||||||
VIR_FREE(nodes);
|
VIR_FREE(nodes);
|
||||||
@ -446,7 +446,7 @@ cmdNodeCpuStats(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(params);
|
VIR_FREE(params);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -928,13 +928,13 @@ cmdNodeMemoryTune(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virTypedParamsFree(params, nparams);
|
virTypedParamsFree(params, nparams);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
save_error:
|
save_error:
|
||||||
vshSaveLibvirtError();
|
vshSaveLibvirtError();
|
||||||
error:
|
error:
|
||||||
vshError(ctl, "%s", _("Unable to change memory parameters"));
|
vshError(ctl, "%s", _("Unable to change memory parameters"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ cmdInterfaceEdit(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (iface)
|
if (iface)
|
||||||
virInterfaceFree(iface);
|
virInterfaceFree(iface);
|
||||||
if (iface_edited)
|
if (iface_edited)
|
||||||
@ -217,7 +217,7 @@ vshInterfaceListCollect(vshControl *ctl,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
||||||
fallback:
|
fallback:
|
||||||
/* fall back to old method (0.10.1 and older) */
|
/* fall back to old method (0.10.1 and older) */
|
||||||
vshResetLibvirtError();
|
vshResetLibvirtError();
|
||||||
|
|
||||||
@ -287,7 +287,7 @@ fallback:
|
|||||||
/* truncate interfaces that weren't found */
|
/* truncate interfaces that weren't found */
|
||||||
deleted = nAllIfaces - list->nifaces;
|
deleted = nAllIfaces - list->nifaces;
|
||||||
|
|
||||||
finished:
|
finished:
|
||||||
/* sort the list */
|
/* sort the list */
|
||||||
if (list->ifaces && list->nifaces)
|
if (list->ifaces && list->nifaces)
|
||||||
qsort(list->ifaces, list->nifaces,
|
qsort(list->ifaces, list->nifaces,
|
||||||
@ -299,7 +299,7 @@ finished:
|
|||||||
|
|
||||||
success = true;
|
success = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
for (i = 0; nActiveIfaces != -1 && i < nActiveIfaces; i++)
|
for (i = 0; nActiveIfaces != -1 && i < nActiveIfaces; i++)
|
||||||
VIR_FREE(activeNames[i]);
|
VIR_FREE(activeNames[i]);
|
||||||
|
|
||||||
|
@ -480,7 +480,7 @@ vshNetworkListCollect(vshControl *ctl,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
||||||
fallback:
|
fallback:
|
||||||
/* fall back to old method (0.10.1 and older) */
|
/* fall back to old method (0.10.1 and older) */
|
||||||
vshResetLibvirtError();
|
vshResetLibvirtError();
|
||||||
|
|
||||||
@ -550,7 +550,7 @@ fallback:
|
|||||||
/* truncate networks that weren't found */
|
/* truncate networks that weren't found */
|
||||||
deleted = nAllNets - list->nnets;
|
deleted = nAllNets - list->nnets;
|
||||||
|
|
||||||
filter:
|
filter:
|
||||||
/* filter list the list if the list was acquired by fallback means */
|
/* filter list the list if the list was acquired by fallback means */
|
||||||
for (i = 0; i < list->nnets; i++) {
|
for (i = 0; i < list->nnets; i++) {
|
||||||
net = list->nets[i];
|
net = list->nets[i];
|
||||||
@ -581,14 +581,14 @@ filter:
|
|||||||
/* the pool matched all filters, it may stay */
|
/* the pool matched all filters, it may stay */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
remove_entry:
|
remove_entry:
|
||||||
/* the pool has to be removed as it failed one of the filters */
|
/* the pool has to be removed as it failed one of the filters */
|
||||||
virNetworkFree(list->nets[i]);
|
virNetworkFree(list->nets[i]);
|
||||||
list->nets[i] = NULL;
|
list->nets[i] = NULL;
|
||||||
deleted++;
|
deleted++;
|
||||||
}
|
}
|
||||||
|
|
||||||
finished:
|
finished:
|
||||||
/* sort the list */
|
/* sort the list */
|
||||||
if (list->nets && list->nnets)
|
if (list->nets && list->nnets)
|
||||||
qsort(list->nets, list->nnets,
|
qsort(list->nets, list->nnets,
|
||||||
@ -600,7 +600,7 @@ finished:
|
|||||||
|
|
||||||
success = true;
|
success = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
for (i = 0; i < nAllNets; i++)
|
for (i = 0; i < nAllNets; i++)
|
||||||
VIR_FREE(names[i]);
|
VIR_FREE(names[i]);
|
||||||
VIR_FREE(names);
|
VIR_FREE(names);
|
||||||
@ -1007,7 +1007,7 @@ cmdNetworkUpdate(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshPrint(ctl, _("Updated network %s %s"),
|
vshPrint(ctl, _("Updated network %s %s"),
|
||||||
virNetworkGetName(network), affected);
|
virNetworkGetName(network), affected);
|
||||||
ret = true;
|
ret = true;
|
||||||
cleanup:
|
cleanup:
|
||||||
vshReportError(ctl);
|
vshReportError(ctl);
|
||||||
virNetworkFree(network);
|
virNetworkFree(network);
|
||||||
VIR_FREE(xmlFromFile);
|
VIR_FREE(xmlFromFile);
|
||||||
@ -1274,7 +1274,7 @@ cmdNetworkEvent(vshControl *ctl, const vshCmd *cmd)
|
|||||||
if (data.count)
|
if (data.count)
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
vshEventCleanup(ctl);
|
vshEventCleanup(ctl);
|
||||||
if (eventId >= 0 &&
|
if (eventId >= 0 &&
|
||||||
virConnectNetworkEventDeregisterAny(ctl->conn, eventId) < 0)
|
virConnectNetworkEventDeregisterAny(ctl->conn, eventId) < 0)
|
||||||
|
@ -160,7 +160,7 @@ cmdNodeDeviceDestroy(vshControl *ctl, const vshCmd *cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
cleanup:
|
cleanup:
|
||||||
virStringFreeList(arr);
|
virStringFreeList(arr);
|
||||||
virNodeDeviceFree(dev);
|
virNodeDeviceFree(dev);
|
||||||
return ret;
|
return ret;
|
||||||
@ -249,7 +249,7 @@ vshNodeDeviceListCollect(vshControl *ctl,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
||||||
fallback:
|
fallback:
|
||||||
/* fall back to old method (0.10.1 and older) */
|
/* fall back to old method (0.10.1 and older) */
|
||||||
vshResetLibvirtError();
|
vshResetLibvirtError();
|
||||||
|
|
||||||
@ -329,14 +329,14 @@ fallback:
|
|||||||
/* the device matched all filters, it may stay */
|
/* the device matched all filters, it may stay */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
remove_entry:
|
remove_entry:
|
||||||
/* the device has to be removed as it failed one of the filters */
|
/* the device has to be removed as it failed one of the filters */
|
||||||
virNodeDeviceFree(list->devices[i]);
|
virNodeDeviceFree(list->devices[i]);
|
||||||
list->devices[i] = NULL;
|
list->devices[i] = NULL;
|
||||||
deleted++;
|
deleted++;
|
||||||
}
|
}
|
||||||
|
|
||||||
finished:
|
finished:
|
||||||
/* sort the list */
|
/* sort the list */
|
||||||
if (list->devices && list->ndevices)
|
if (list->devices && list->ndevices)
|
||||||
qsort(list->devices, list->ndevices,
|
qsort(list->devices, list->ndevices,
|
||||||
@ -348,7 +348,7 @@ finished:
|
|||||||
|
|
||||||
success = true;
|
success = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
for (i = 0; ndevices != -1 && i < ndevices; i++)
|
for (i = 0; ndevices != -1 && i < ndevices; i++)
|
||||||
VIR_FREE(names[i]);
|
VIR_FREE(names[i]);
|
||||||
VIR_FREE(names);
|
VIR_FREE(names);
|
||||||
@ -500,7 +500,7 @@ cmdNodeListDevices(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
|
|||||||
vshPrint(ctl, "%s\n", virNodeDeviceGetName(list->devices[i]));
|
vshPrint(ctl, "%s\n", virNodeDeviceGetName(list->devices[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virStringFreeList(caps);
|
virStringFreeList(caps);
|
||||||
vshNodeDeviceListFree(list);
|
vshNodeDeviceListFree(list);
|
||||||
return ret;
|
return ret;
|
||||||
@ -568,7 +568,7 @@ cmdNodeDeviceDumpXML(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshPrint(ctl, "%s\n", xml);
|
vshPrint(ctl, "%s\n", xml);
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
cleanup:
|
cleanup:
|
||||||
virStringFreeList(arr);
|
virStringFreeList(arr);
|
||||||
VIR_FREE(xml);
|
VIR_FREE(xml);
|
||||||
virNodeDeviceFree(device);
|
virNodeDeviceFree(device);
|
||||||
|
@ -284,7 +284,7 @@ vshNWFilterListCollect(vshControl *ctl,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
||||||
fallback:
|
fallback:
|
||||||
/* fall back to old method (0.9.13 and older) */
|
/* fall back to old method (0.9.13 and older) */
|
||||||
vshResetLibvirtError();
|
vshResetLibvirtError();
|
||||||
|
|
||||||
@ -318,7 +318,7 @@ fallback:
|
|||||||
/* truncate network filters that weren't found */
|
/* truncate network filters that weren't found */
|
||||||
deleted = nfilters - list->nfilters;
|
deleted = nfilters - list->nfilters;
|
||||||
|
|
||||||
finished:
|
finished:
|
||||||
/* sort the list */
|
/* sort the list */
|
||||||
if (list->filters && list->nfilters)
|
if (list->filters && list->nfilters)
|
||||||
qsort(list->filters, list->nfilters,
|
qsort(list->filters, list->nfilters,
|
||||||
@ -330,7 +330,7 @@ finished:
|
|||||||
|
|
||||||
success = true;
|
success = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
for (i = 0; nfilters != -1 && i < nfilters; i++)
|
for (i = 0; nfilters != -1 && i < nfilters; i++)
|
||||||
VIR_FREE(names[i]);
|
VIR_FREE(names[i]);
|
||||||
VIR_FREE(names);
|
VIR_FREE(names);
|
||||||
@ -438,7 +438,7 @@ cmdNWFilterEdit(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (nwfilter)
|
if (nwfilter)
|
||||||
virNWFilterFree(nwfilter);
|
virNWFilterFree(nwfilter);
|
||||||
if (nwfilter_edited)
|
if (nwfilter_edited)
|
||||||
|
@ -290,7 +290,7 @@ vshBuildPoolXML(vshControl *ctl,
|
|||||||
*retname = name;
|
*retname = name;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -755,7 +755,7 @@ vshStoragePoolListCollect(vshControl *ctl,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
||||||
fallback:
|
fallback:
|
||||||
/* fall back to old method (0.10.1 and older) */
|
/* fall back to old method (0.10.1 and older) */
|
||||||
vshResetLibvirtError();
|
vshResetLibvirtError();
|
||||||
|
|
||||||
@ -832,7 +832,7 @@ fallback:
|
|||||||
/* truncate pools that weren't found */
|
/* truncate pools that weren't found */
|
||||||
deleted = nAllPools - list->npools;
|
deleted = nAllPools - list->npools;
|
||||||
|
|
||||||
filter:
|
filter:
|
||||||
/* filter list the list if the list was acquired by fallback means */
|
/* filter list the list if the list was acquired by fallback means */
|
||||||
for (i = 0; i < list->npools; i++) {
|
for (i = 0; i < list->npools; i++) {
|
||||||
pool = list->pools[i];
|
pool = list->pools[i];
|
||||||
@ -864,14 +864,14 @@ filter:
|
|||||||
/* the pool matched all filters, it may stay */
|
/* the pool matched all filters, it may stay */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
remove_entry:
|
remove_entry:
|
||||||
/* the pool has to be removed as it failed one of the filters */
|
/* the pool has to be removed as it failed one of the filters */
|
||||||
virStoragePoolFree(list->pools[i]);
|
virStoragePoolFree(list->pools[i]);
|
||||||
list->pools[i] = NULL;
|
list->pools[i] = NULL;
|
||||||
deleted++;
|
deleted++;
|
||||||
}
|
}
|
||||||
|
|
||||||
finished:
|
finished:
|
||||||
/* sort the list */
|
/* sort the list */
|
||||||
if (list->pools && list->npools)
|
if (list->pools && list->npools)
|
||||||
qsort(list->pools, list->npools,
|
qsort(list->pools, list->npools,
|
||||||
@ -883,7 +883,7 @@ finished:
|
|||||||
|
|
||||||
success = true;
|
success = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
for (i = 0; i < nAllPools; i++)
|
for (i = 0; i < nAllPools; i++)
|
||||||
VIR_FREE(names[i]);
|
VIR_FREE(names[i]);
|
||||||
|
|
||||||
@ -1305,7 +1305,7 @@ cmdPoolList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
|
|||||||
/* Cleanup and return */
|
/* Cleanup and return */
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(outputStr);
|
VIR_FREE(outputStr);
|
||||||
if (list && list->npools) {
|
if (list && list->npools) {
|
||||||
for (i = 0; i < list->npools; i++) {
|
for (i = 0; i < list->npools; i++) {
|
||||||
|
@ -117,7 +117,7 @@ cmdSecretDefine(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshPrint(ctl, _("Secret %s created\n"), uuid);
|
vshPrint(ctl, _("Secret %s created\n"), uuid);
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(buffer);
|
VIR_FREE(buffer);
|
||||||
if (res)
|
if (res)
|
||||||
virSecretFree(res);
|
virSecretFree(res);
|
||||||
@ -164,7 +164,7 @@ cmdSecretDumpXML(vshControl *ctl, const vshCmd *cmd)
|
|||||||
VIR_FREE(xml);
|
VIR_FREE(xml);
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virSecretFree(secret);
|
virSecretFree(secret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -232,7 +232,7 @@ cmdSecretSetValue(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshPrint(ctl, "%s", _("Secret value set\n"));
|
vshPrint(ctl, "%s", _("Secret value set\n"));
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virSecretFree(secret);
|
virSecretFree(secret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -289,7 +289,7 @@ cmdSecretGetValue(vshControl *ctl, const vshCmd *cmd)
|
|||||||
VIR_FREE(base64);
|
VIR_FREE(base64);
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virSecretFree(secret);
|
virSecretFree(secret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -334,7 +334,7 @@ cmdSecretUndefine(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshPrint(ctl, _("Secret %s deleted\n"), uuid);
|
vshPrint(ctl, _("Secret %s deleted\n"), uuid);
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virSecretFree(secret);
|
virSecretFree(secret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -410,7 +410,7 @@ vshSecretListCollect(vshControl *ctl,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
|
||||||
fallback:
|
fallback:
|
||||||
/* fall back to old method (0.10.1 and older) */
|
/* fall back to old method (0.10.1 and older) */
|
||||||
vshResetLibvirtError();
|
vshResetLibvirtError();
|
||||||
|
|
||||||
@ -449,7 +449,7 @@ fallback:
|
|||||||
/* truncate secrets that weren't found */
|
/* truncate secrets that weren't found */
|
||||||
deleted = nsecrets - list->nsecrets;
|
deleted = nsecrets - list->nsecrets;
|
||||||
|
|
||||||
finished:
|
finished:
|
||||||
/* sort the list */
|
/* sort the list */
|
||||||
if (list->secrets && list->nsecrets)
|
if (list->secrets && list->nsecrets)
|
||||||
qsort(list->secrets, list->nsecrets,
|
qsort(list->secrets, list->nsecrets,
|
||||||
@ -461,7 +461,7 @@ finished:
|
|||||||
|
|
||||||
success = true;
|
success = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (nsecrets > 0) {
|
if (nsecrets > 0) {
|
||||||
for (i = 0; i < nsecrets; i++)
|
for (i = 0; i < nsecrets; i++)
|
||||||
VIR_FREE(uuids[i]);
|
VIR_FREE(uuids[i]);
|
||||||
@ -559,7 +559,7 @@ cmdSecretList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
vshSecretListFree(list);
|
vshSecretListFree(list);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ vshSnapshotCreate(vshControl *ctl, virDomainPtr dom, const char *buffer,
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
xmlXPathFreeContext(ctxt);
|
xmlXPathFreeContext(ctxt);
|
||||||
xmlFreeDoc(xml);
|
xmlFreeDoc(xml);
|
||||||
if (snapshot)
|
if (snapshot)
|
||||||
@ -214,7 +214,7 @@ cmdSnapshotCreate(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = vshSnapshotCreate(ctl, dom, buffer, flags, from);
|
ret = vshSnapshotCreate(ctl, dom, buffer, flags, from);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(buffer);
|
VIR_FREE(buffer);
|
||||||
if (dom)
|
if (dom)
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
@ -258,7 +258,7 @@ vshParseSnapshotMemspec(vshControl *ctl, virBufferPtr buf, const char *str)
|
|||||||
virBufferEscapeString(buf, " file='%s'", file);
|
virBufferEscapeString(buf, " file='%s'", file);
|
||||||
virBufferAddLit(buf, "/>\n");
|
virBufferAddLit(buf, "/>\n");
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
vshError(ctl, _("unable to parse memspec: %s"), str);
|
vshError(ctl, _("unable to parse memspec: %s"), str);
|
||||||
virStringFreeList(array);
|
virStringFreeList(array);
|
||||||
@ -309,7 +309,7 @@ vshParseSnapshotDiskspec(vshControl *ctl, virBufferPtr buf, const char *str)
|
|||||||
virBufferAddLit(buf, "/>\n");
|
virBufferAddLit(buf, "/>\n");
|
||||||
}
|
}
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
vshError(ctl, _("unable to parse diskspec: %s"), str);
|
vshError(ctl, _("unable to parse diskspec: %s"), str);
|
||||||
virStringFreeList(array);
|
virStringFreeList(array);
|
||||||
@ -464,7 +464,7 @@ cmdSnapshotCreateAs(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = vshSnapshotCreate(ctl, dom, buffer, flags, NULL);
|
ret = vshSnapshotCreate(ctl, dom, buffer, flags, NULL);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
VIR_FREE(buffer);
|
VIR_FREE(buffer);
|
||||||
virDomainFree(dom);
|
virDomainFree(dom);
|
||||||
@ -620,7 +620,7 @@ cmdSnapshotEdit(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (!ret && name)
|
if (!ret && name)
|
||||||
vshError(ctl, _("Failed to update %s"), name);
|
vshError(ctl, _("Failed to update %s"), name);
|
||||||
if (edited)
|
if (edited)
|
||||||
@ -739,7 +739,7 @@ cmdSnapshotCurrent(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (!ret)
|
if (!ret)
|
||||||
vshReportError(ctl);
|
vshReportError(ctl);
|
||||||
VIR_FREE(xml);
|
VIR_FREE(xml);
|
||||||
@ -795,7 +795,7 @@ vshGetSnapshotParent(vshControl *ctl, virDomainSnapshotPtr snapshot,
|
|||||||
*parent_name = virXPathString("string(/domainsnapshot/parent/name)", ctxt);
|
*parent_name = virXPathString("string(/domainsnapshot/parent/name)", ctxt);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
vshReportError(ctl);
|
vshReportError(ctl);
|
||||||
vshError(ctl, "%s", _("unable to determine if snapshot has parent"));
|
vshError(ctl, "%s", _("unable to determine if snapshot has parent"));
|
||||||
@ -859,7 +859,7 @@ vshSnapshotFilter(vshControl *ctl, virDomainSnapshotPtr snapshot,
|
|||||||
ret = !!(flags & VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE);
|
ret = !!(flags & VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(state);
|
VIR_FREE(state);
|
||||||
xmlXPathFreeContext(ctxt);
|
xmlXPathFreeContext(ctxt);
|
||||||
xmlFreeDoc(xmldoc);
|
xmlFreeDoc(xmldoc);
|
||||||
@ -1030,7 +1030,7 @@ cmdSnapshotInfo(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(state);
|
VIR_FREE(state);
|
||||||
xmlXPathFreeContext(ctxt);
|
xmlXPathFreeContext(ctxt);
|
||||||
xmlFreeDoc(xmldoc);
|
xmlFreeDoc(xmldoc);
|
||||||
@ -1375,7 +1375,7 @@ vshSnapshotListCollect(vshControl *ctl, virDomainPtr dom,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
success:
|
success:
|
||||||
if (filter_fallback) {
|
if (filter_fallback) {
|
||||||
/* Older API didn't filter on status or location, but the
|
/* Older API didn't filter on status or location, but the
|
||||||
* information is available in domain XML. */
|
* information is available in domain XML. */
|
||||||
@ -1406,7 +1406,7 @@ success:
|
|||||||
ret = snaplist;
|
ret = snaplist;
|
||||||
snaplist = NULL;
|
snaplist = NULL;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
vshSnapshotListFree(snaplist);
|
vshSnapshotListFree(snaplist);
|
||||||
if (names && count > 0)
|
if (names && count > 0)
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
@ -1673,7 +1673,7 @@ cmdSnapshotList(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
/* this frees up memory from the last iteration of the loop */
|
/* this frees up memory from the last iteration of the loop */
|
||||||
vshSnapshotListFree(snaplist);
|
vshSnapshotListFree(snaplist);
|
||||||
VIR_FREE(parent_snap);
|
VIR_FREE(parent_snap);
|
||||||
@ -1747,7 +1747,7 @@ cmdSnapshotDumpXML(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshPrint(ctl, "%s", xml);
|
vshPrint(ctl, "%s", xml);
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(xml);
|
VIR_FREE(xml);
|
||||||
if (snapshot)
|
if (snapshot)
|
||||||
virDomainSnapshotFree(snapshot);
|
virDomainSnapshotFree(snapshot);
|
||||||
@ -1814,7 +1814,7 @@ cmdSnapshotParent(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(parent);
|
VIR_FREE(parent);
|
||||||
if (snapshot)
|
if (snapshot)
|
||||||
virDomainSnapshotFree(snapshot);
|
virDomainSnapshotFree(snapshot);
|
||||||
@ -1908,7 +1908,7 @@ cmdDomainSnapshotRevert(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (snapshot)
|
if (snapshot)
|
||||||
virDomainSnapshotFree(snapshot);
|
virDomainSnapshotFree(snapshot);
|
||||||
if (dom)
|
if (dom)
|
||||||
@ -1998,7 +1998,7 @@ cmdSnapshotDelete(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (snapshot)
|
if (snapshot)
|
||||||
virDomainSnapshotFree(snapshot);
|
virDomainSnapshotFree(snapshot);
|
||||||
if (dom)
|
if (dom)
|
||||||
|
@ -379,7 +379,7 @@ cmdVolCreate(vshControl *ctl, const vshCmd *cmd)
|
|||||||
vshError(ctl, _("Failed to create vol from %s"), from);
|
vshError(ctl, _("Failed to create vol from %s"), from);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(buffer);
|
VIR_FREE(buffer);
|
||||||
virStoragePoolFree(pool);
|
virStoragePoolFree(pool);
|
||||||
return ret;
|
return ret;
|
||||||
@ -463,7 +463,7 @@ cmdVolCreateFrom(vshControl *ctl, const vshCmd *cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(buffer);
|
VIR_FREE(buffer);
|
||||||
if (pool)
|
if (pool)
|
||||||
virStoragePoolFree(pool);
|
virStoragePoolFree(pool);
|
||||||
@ -496,7 +496,7 @@ vshMakeCloneXML(const char *origxml, const char *newname)
|
|||||||
xmlNodeSetContent(obj->nodesetval->nodeTab[0], (const xmlChar *)newname);
|
xmlNodeSetContent(obj->nodesetval->nodeTab[0], (const xmlChar *)newname);
|
||||||
xmlDocDumpMemory(doc, &newxml, &size);
|
xmlDocDumpMemory(doc, &newxml, &size);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
xmlXPathFreeObject(obj);
|
xmlXPathFreeObject(obj);
|
||||||
xmlXPathFreeContext(ctxt);
|
xmlXPathFreeContext(ctxt);
|
||||||
xmlFreeDoc(doc);
|
xmlFreeDoc(doc);
|
||||||
@ -587,7 +587,7 @@ cmdVolClone(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(origxml);
|
VIR_FREE(origxml);
|
||||||
xmlFree(newxml);
|
xmlFree(newxml);
|
||||||
if (origvol)
|
if (origvol)
|
||||||
@ -708,7 +708,7 @@ cmdVolUpload(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (vol)
|
if (vol)
|
||||||
virStorageVolFree(vol);
|
virStorageVolFree(vol);
|
||||||
if (st)
|
if (st)
|
||||||
@ -822,7 +822,7 @@ cmdVolDownload(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FORCE_CLOSE(fd);
|
VIR_FORCE_CLOSE(fd);
|
||||||
if (!ret && created)
|
if (!ret && created)
|
||||||
unlink(file);
|
unlink(file);
|
||||||
@ -952,7 +952,7 @@ cmdVolWipe(vshControl *ctl, const vshCmd *cmd)
|
|||||||
|
|
||||||
vshPrint(ctl, _("Vol %s wiped\n"), name);
|
vshPrint(ctl, _("Vol %s wiped\n"), name);
|
||||||
ret = true;
|
ret = true;
|
||||||
out:
|
out:
|
||||||
virStorageVolFree(vol);
|
virStorageVolFree(vol);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1131,7 +1131,7 @@ cmdVolResize(vshControl *ctl, const vshCmd *cmd)
|
|||||||
ret = false;
|
ret = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virStorageVolFree(vol);
|
virStorageVolFree(vol);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1251,7 +1251,7 @@ vshStorageVolListCollect(vshControl *ctl,
|
|||||||
vshError(ctl, "%s", _("Failed to list volumes"));
|
vshError(ctl, "%s", _("Failed to list volumes"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
fallback:
|
fallback:
|
||||||
/* fall back to old method (0.10.1 and older) */
|
/* fall back to old method (0.10.1 and older) */
|
||||||
vshResetLibvirtError();
|
vshResetLibvirtError();
|
||||||
|
|
||||||
@ -1286,7 +1286,7 @@ fallback:
|
|||||||
/* truncate the list for not found vols */
|
/* truncate the list for not found vols */
|
||||||
deleted = nvols - list->nvols;
|
deleted = nvols - list->nvols;
|
||||||
|
|
||||||
finished:
|
finished:
|
||||||
/* sort the list */
|
/* sort the list */
|
||||||
if (list->vols && list->nvols)
|
if (list->vols && list->nvols)
|
||||||
qsort(list->vols, list->nvols, sizeof(*list->vols), vshStorageVolSorter);
|
qsort(list->vols, list->nvols, sizeof(*list->vols), vshStorageVolSorter);
|
||||||
@ -1296,7 +1296,7 @@ finished:
|
|||||||
|
|
||||||
success = true;
|
success = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (nvols > 0)
|
if (nvols > 0)
|
||||||
for (i = 0; i < nvols; i++)
|
for (i = 0; i < nvols; i++)
|
||||||
VIR_FREE(names[i]);
|
VIR_FREE(names[i]);
|
||||||
@ -1529,7 +1529,7 @@ cmdVolList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
|
|||||||
/* Cleanup and return */
|
/* Cleanup and return */
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
|
||||||
/* Safely free the memory allocated in this function */
|
/* Safely free the memory allocated in this function */
|
||||||
if (list && list->nvols) {
|
if (list && list->nvols) {
|
||||||
|
@ -291,7 +291,7 @@ vshReportError(vshControl *ctl)
|
|||||||
|
|
||||||
vshError(ctl, "%s", last_error->message);
|
vshError(ctl, "%s", last_error->message);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
vshResetLibvirtError();
|
vshResetLibvirtError();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -686,7 +686,7 @@ vshTreePrintInternal(vshControl *ctl,
|
|||||||
if (!root)
|
if (!root)
|
||||||
virBufferTrim(indent, NULL, 2);
|
virBufferTrim(indent, NULL, 2);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -799,7 +799,7 @@ vshEditFile(vshControl *ctl, const char *filename)
|
|||||||
}
|
}
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virCommandFree(cmd);
|
virCommandFree(cmd);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1162,7 +1162,7 @@ vshCmddefGetOption(vshControl *ctl, const vshCmdDef *cmd, const char *name,
|
|||||||
vshError(ctl, _("command '%s' doesn't support option --%s"),
|
vshError(ctl, _("command '%s' doesn't support option --%s"),
|
||||||
cmd->name, name);
|
cmd->name, name);
|
||||||
}
|
}
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(alias);
|
VIR_FREE(alias);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1995,7 +1995,7 @@ vshCommandParse(vshControl *ctl, vshCommandParser *parser)
|
|||||||
data_only = true;
|
data_only = true;
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
get_data:
|
get_data:
|
||||||
/* Special case 'help' to ignore spurious data */
|
/* Special case 'help' to ignore spurious data */
|
||||||
if (!(opt = vshCmddefGetData(cmd, &opts_need_arg,
|
if (!(opt = vshCmddefGetData(cmd, &opts_need_arg,
|
||||||
&opts_seen)) &&
|
&opts_seen)) &&
|
||||||
@ -2814,7 +2814,7 @@ vshOutputLogFile(vshControl *ctl, int log_level, const char *msg_format,
|
|||||||
VIR_FREE(str);
|
VIR_FREE(str);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
vshCloseLogFile(ctl);
|
vshCloseLogFile(ctl);
|
||||||
vshError(ctl, "%s", _("failed to write the log file"));
|
vshError(ctl, "%s", _("failed to write the log file"));
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
|
@ -94,7 +94,7 @@ static int virLoginShellAllowedUser(virConfPtr conf,
|
|||||||
virReportSystemError(EPERM,
|
virReportSystemError(EPERM,
|
||||||
_("%s not matched against 'allowed_users' in %s"),
|
_("%s not matched against 'allowed_users' in %s"),
|
||||||
name, conf_file);
|
name, conf_file);
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(gname);
|
VIR_FREE(gname);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -130,7 +130,7 @@ static char **virLoginShellGetShellArgv(virConfPtr conf)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return shargv;
|
return shargv;
|
||||||
error:
|
error:
|
||||||
virStringFreeList(shargv);
|
virStringFreeList(shargv);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -338,7 +338,7 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
/* At this point, the parent is now waiting for the child to exit,
|
/* At this point, the parent is now waiting for the child to exit,
|
||||||
* but as that may take a long time, we release resources now. */
|
* but as that may take a long time, we release resources now. */
|
||||||
cleanup:
|
cleanup:
|
||||||
if (nfdlist > 0)
|
if (nfdlist > 0)
|
||||||
for (i = 0; i < nfdlist; i++)
|
for (i = 0; i < nfdlist; i++)
|
||||||
VIR_FORCE_CLOSE(fdlist[i]);
|
VIR_FORCE_CLOSE(fdlist[i]);
|
||||||
|
@ -344,7 +344,7 @@ dissect_libvirt_payload(tvbuff_t *tvb, proto_tree *tree,
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
unknown:
|
unknown:
|
||||||
dbg("Cannot determine payload: Prog=%u, Proc=%u, Type=%u, Status=%u", prog, proc, type, status);
|
dbg("Cannot determine payload: Prog=%u, Proc=%u, Type=%u, Status=%u", prog, proc, type, status);
|
||||||
proto_tree_add_item(tree, hf_libvirt_unknown, tvb, VIR_HEADER_LEN, -1, ENC_NA);
|
proto_tree_add_item(tree, hf_libvirt_unknown, tvb, VIR_HEADER_LEN, -1, ENC_NA);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user