mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
Indent top-level labels by one space in src/qemu/
This commit is contained in:
parent
34ff191cc9
commit
5922d05aec
@ -240,7 +240,7 @@ qemuAgentOpenUnix(const char *monitor, pid_t cpid, bool *inProgress)
|
|||||||
|
|
||||||
return monfd;
|
return monfd;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FORCE_CLOSE(monfd);
|
VIR_FORCE_CLOSE(monfd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -264,7 +264,7 @@ qemuAgentOpenPty(const char *monitor)
|
|||||||
|
|
||||||
return monfd;
|
return monfd;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FORCE_CLOSE(monfd);
|
VIR_FORCE_CLOSE(monfd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -352,7 +352,7 @@ qemuAgentIOProcessLine(qemuAgentPtr mon,
|
|||||||
_("Unknown JSON reply '%s'"), line);
|
_("Unknown JSON reply '%s'"), line);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(obj);
|
virJSONValueFree(obj);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -777,7 +777,7 @@ qemuAgentOpen(virDomainObjPtr vm,
|
|||||||
|
|
||||||
return mon;
|
return mon;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
/* We don't want the 'destroy' callback invoked during
|
/* We don't want the 'destroy' callback invoked during
|
||||||
* cleanup from construction failure, because that can
|
* cleanup from construction failure, because that can
|
||||||
* give a double-unref on virDomainObjPtr in the caller,
|
* give a double-unref on virDomainObjPtr in the caller,
|
||||||
@ -888,7 +888,7 @@ static int qemuAgentSend(qemuAgentPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
mon->msg = NULL;
|
mon->msg = NULL;
|
||||||
qemuAgentUpdateWatch(mon);
|
qemuAgentUpdateWatch(mon);
|
||||||
|
|
||||||
@ -959,7 +959,7 @@ qemuAgentGuestSync(qemuAgentPtr mon)
|
|||||||
}
|
}
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(sync_msg.rxObject);
|
virJSONValueFree(sync_msg.rxObject);
|
||||||
VIR_FREE(sync_msg.txBuffer);
|
VIR_FREE(sync_msg.txBuffer);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1012,7 +1012,7 @@ qemuAgentCommand(qemuAgentPtr mon,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmdstr);
|
VIR_FREE(cmdstr);
|
||||||
VIR_FREE(msg.txBuffer);
|
VIR_FREE(msg.txBuffer);
|
||||||
|
|
||||||
@ -1226,7 +1226,7 @@ qemuAgentMakeCommand(const char *cmdname,
|
|||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virJSONValueFree(obj);
|
virJSONValueFree(obj);
|
||||||
virJSONValueFree(jargs);
|
virJSONValueFree(jargs);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
@ -1317,7 +1317,7 @@ int qemuAgentFSFreeze(qemuAgentPtr mon)
|
|||||||
_("malformed return value"));
|
_("malformed return value"));
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1355,7 +1355,7 @@ int qemuAgentFSThaw(qemuAgentPtr mon)
|
|||||||
_("malformed return value"));
|
_("malformed return value"));
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1426,7 +1426,7 @@ qemuAgentArbitraryCommand(qemuAgentPtr mon,
|
|||||||
ret = -1;
|
ret = -1;
|
||||||
|
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1526,7 +1526,7 @@ qemuAgentGetVCPUs(qemuAgentPtr mon,
|
|||||||
|
|
||||||
ret = ndata;
|
ret = ndata;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1590,7 +1590,7 @@ qemuAgentSetVCPUs(qemuAgentPtr mon,
|
|||||||
_("malformed return value"));
|
_("malformed return value"));
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
virJSONValueFree(cpu);
|
virJSONValueFree(cpu);
|
||||||
|
@ -482,7 +482,7 @@ virQEMUCapsProbeMachineTypes(virQEMUCapsPtr qemuCaps,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(output);
|
VIR_FREE(output);
|
||||||
virCommandFree(cmd);
|
virCommandFree(cmd);
|
||||||
|
|
||||||
@ -546,7 +546,7 @@ virQEMUCapsParseX86Models(const char *output,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -595,7 +595,7 @@ virQEMUCapsParsePPCModels(const char *output,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -630,7 +630,7 @@ virQEMUCapsProbeCPUModels(virQEMUCapsPtr qemuCaps, uid_t runUid, gid_t runGid)
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(output);
|
VIR_FREE(output);
|
||||||
virCommandFree(cmd);
|
virCommandFree(cmd);
|
||||||
|
|
||||||
@ -840,7 +840,7 @@ virQEMUCapsInitGuest(virCapsPtr caps,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(binary);
|
VIR_FREE(binary);
|
||||||
VIR_FREE(kvmbin);
|
VIR_FREE(kvmbin);
|
||||||
virObjectUnref(qemubinCaps);
|
virObjectUnref(qemubinCaps);
|
||||||
@ -848,7 +848,7 @@ cleanup:
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virCapabilitiesFreeMachines(machines, nmachines);
|
virCapabilitiesFreeMachines(machines, nmachines);
|
||||||
|
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -884,12 +884,12 @@ virQEMUCapsInitCPU(virCapsPtr caps,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
cpuDataFree(data);
|
cpuDataFree(data);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virCPUDefFree(cpu);
|
virCPUDefFree(cpu);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -937,7 +937,7 @@ virCapsPtr virQEMUCapsInit(virQEMUCapsCachePtr cache)
|
|||||||
|
|
||||||
return caps;
|
return caps;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virObjectUnref(caps);
|
virObjectUnref(caps);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -1325,7 +1325,7 @@ int virQEMUCapsParseHelpStr(const char *qemu,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
p = strchr(help, '\n');
|
p = strchr(help, '\n');
|
||||||
if (!p)
|
if (!p)
|
||||||
p = strchr(help, '\0');
|
p = strchr(help, '\0');
|
||||||
@ -1334,7 +1334,7 @@ fail:
|
|||||||
_("cannot parse %s version number in '%.*s'"),
|
_("cannot parse %s version number in '%.*s'"),
|
||||||
qemu, (int) (p - help), help);
|
qemu, (int) (p - help), help);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1596,7 +1596,7 @@ virQEMUCapsParseDeviceStrObjectTypes(const char *str,
|
|||||||
*types = typelist;
|
*types = typelist;
|
||||||
ret = ntypelist;
|
ret = ntypelist;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
virQEMUCapsFreeStringList(ntypelist, typelist);
|
virQEMUCapsFreeStringList(ntypelist, typelist);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1649,7 +1649,7 @@ virQEMUCapsParseDeviceStrObjectProps(const char *str,
|
|||||||
*props = proplist;
|
*props = proplist;
|
||||||
ret = nproplist;
|
ret = nproplist;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
virQEMUCapsFreeStringList(nproplist, proplist);
|
virQEMUCapsFreeStringList(nproplist, proplist);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1731,7 +1731,7 @@ virQEMUCapsExtractDeviceStr(const char *qemu,
|
|||||||
|
|
||||||
ret = virQEMUCapsParseDeviceStr(qemuCaps, output);
|
ret = virQEMUCapsParseDeviceStr(qemuCaps, output);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(output);
|
VIR_FREE(output);
|
||||||
virCommandFree(cmd);
|
virCommandFree(cmd);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1787,7 +1787,7 @@ virQEMUCapsNew(void)
|
|||||||
|
|
||||||
return qemuCaps;
|
return qemuCaps;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virObjectUnref(qemuCaps);
|
virObjectUnref(qemuCaps);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -1832,7 +1832,7 @@ virQEMUCapsPtr virQEMUCapsNewCopy(virQEMUCapsPtr qemuCaps)
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virObjectUnref(ret);
|
virObjectUnref(ret);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -1995,7 +1995,7 @@ int virQEMUCapsGetMachineTypesCaps(virQEMUCapsPtr qemuCaps,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virCapabilitiesFreeMachines(*machines, *nmachines);
|
virCapabilitiesFreeMachines(*machines, *nmachines);
|
||||||
*nmachines = 0;
|
*nmachines = 0;
|
||||||
*machines = NULL;
|
*machines = NULL;
|
||||||
@ -2179,7 +2179,7 @@ virQEMUCapsProbeQMPMachineTypes(virQEMUCapsPtr qemuCaps,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
for (i = 0; i < nmachines; i++)
|
for (i = 0; i < nmachines; i++)
|
||||||
qemuMonitorMachineInfoFree(machines[i]);
|
qemuMonitorMachineInfoFree(machines[i]);
|
||||||
VIR_FREE(machines);
|
VIR_FREE(machines);
|
||||||
@ -2522,7 +2522,7 @@ virQEMUCapsLoadCache(virQEMUCapsPtr qemuCaps, const char *filename,
|
|||||||
VIR_FREE(nodes);
|
VIR_FREE(nodes);
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(str);
|
VIR_FREE(str);
|
||||||
VIR_FREE(nodes);
|
VIR_FREE(nodes);
|
||||||
xmlXPathFreeContext(ctxt);
|
xmlXPathFreeContext(ctxt);
|
||||||
@ -2815,7 +2815,7 @@ virQEMUCapsInitHelp(virQEMUCapsPtr qemuCaps, uid_t runUid, gid_t runGid)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
virCommandFree(cmd);
|
virCommandFree(cmd);
|
||||||
VIR_FREE(help);
|
VIR_FREE(help);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2928,7 +2928,7 @@ virQEMUCapsInitArchQMPBasic(virQEMUCapsPtr qemuCaps,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(archstr);
|
VIR_FREE(archstr);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -3013,7 +3013,7 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(package);
|
VIR_FREE(package);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -3140,7 +3140,7 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (mon)
|
if (mon)
|
||||||
virObjectUnlock(mon);
|
virObjectUnlock(mon);
|
||||||
qemuMonitorClose(mon);
|
qemuMonitorClose(mon);
|
||||||
@ -3243,7 +3243,7 @@ virQEMUCapsPtr virQEMUCapsNewForBinary(const char *binary,
|
|||||||
|
|
||||||
return qemuCaps;
|
return qemuCaps;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virObjectUnref(qemuCaps);
|
virObjectUnref(qemuCaps);
|
||||||
qemuCaps = NULL;
|
qemuCaps = NULL;
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -3301,7 +3301,7 @@ virQEMUCapsCacheNew(const char *libDir,
|
|||||||
|
|
||||||
return cache;
|
return cache;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virQEMUCapsCacheFree(cache);
|
virQEMUCapsCacheFree(cache);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -313,7 +313,7 @@ qemuSetupHostdevCGroup(virDomainObjPtr vm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
virPCIDeviceFree(pci);
|
virPCIDeviceFree(pci);
|
||||||
virUSBDeviceFree(usb);
|
virUSBDeviceFree(usb);
|
||||||
virSCSIDeviceFree(scsi);
|
virSCSIDeviceFree(scsi);
|
||||||
@ -374,7 +374,7 @@ qemuTeardownHostdevCgroup(virDomainObjPtr vm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
virPCIDeviceFree(pci);
|
virPCIDeviceFree(pci);
|
||||||
VIR_FREE(path);
|
VIR_FREE(path);
|
||||||
return ret;
|
return ret;
|
||||||
@ -569,7 +569,7 @@ qemuSetupDevicesCgroup(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -633,7 +633,7 @@ qemuSetupCpusetCgroup(virDomainObjPtr vm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(mem_mask);
|
VIR_FREE(mem_mask);
|
||||||
VIR_FREE(cpu_mask);
|
VIR_FREE(cpu_mask);
|
||||||
return ret;
|
return ret;
|
||||||
@ -716,9 +716,9 @@ qemuInitCgroup(virQEMUDriverPtr driver,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -750,9 +750,9 @@ qemuConnectCgroup(virQEMUDriverPtr driver,
|
|||||||
&priv->cgroup) < 0)
|
&priv->cgroup) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -797,7 +797,7 @@ qemuSetupCgroup(virQEMUDriverPtr driver,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(caps);
|
virObjectUnref(caps);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -827,7 +827,7 @@ qemuSetupCgroupVcpuBW(virCgroupPtr cgroup,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (period) {
|
if (period) {
|
||||||
virErrorPtr saved = virSaveLastError();
|
virErrorPtr saved = virSaveLastError();
|
||||||
ignore_value(virCgroupSetCpuCfsPeriod(cgroup, old_period));
|
ignore_value(virCgroupSetCpuCfsPeriod(cgroup, old_period));
|
||||||
@ -875,7 +875,7 @@ qemuSetupCgroupEmulatorPin(virCgroupPtr cgroup,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(new_cpus);
|
VIR_FREE(new_cpus);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -948,7 +948,7 @@ qemuSetupCgroupForVcpu(virDomainObjPtr vm)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (cgroup_vcpu) {
|
if (cgroup_vcpu) {
|
||||||
virCgroupRemove(cgroup_vcpu);
|
virCgroupRemove(cgroup_vcpu);
|
||||||
virCgroupFree(&cgroup_vcpu);
|
virCgroupFree(&cgroup_vcpu);
|
||||||
@ -1013,7 +1013,7 @@ qemuSetupCgroupForEmulator(virQEMUDriverPtr driver,
|
|||||||
virBitmapFree(cpumap);
|
virBitmapFree(cpumap);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virBitmapFree(cpumap);
|
virBitmapFree(cpumap);
|
||||||
|
|
||||||
if (cgroup_emulator) {
|
if (cgroup_emulator) {
|
||||||
|
@ -196,7 +196,7 @@ qemuPhysIfaceConnect(virDomainDefPtr def,
|
|||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
ignore_value(virNetDevMacVLanDeleteWithVPortProfile(
|
ignore_value(virNetDevMacVLanDeleteWithVPortProfile(
|
||||||
res_ifname, &net->mac,
|
res_ifname, &net->mac,
|
||||||
virDomainNetGetActualDirectDev(net),
|
virDomainNetGetActualDirectDev(net),
|
||||||
@ -274,7 +274,7 @@ static int qemuCreateInBridgePortWithHelper(virQEMUDriverConfigPtr cfg,
|
|||||||
*tapfd = -1;
|
*tapfd = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virCommandFree(cmd);
|
virCommandFree(cmd);
|
||||||
VIR_FORCE_CLOSE(pair[0]);
|
VIR_FORCE_CLOSE(pair[0]);
|
||||||
return *tapfd < 0 ? -1 : 0;
|
return *tapfd < 0 ? -1 : 0;
|
||||||
@ -402,7 +402,7 @@ qemuNetworkIfaceConnect(virDomainDefPtr def,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
size_t i;
|
size_t i;
|
||||||
for (i = 0; i < *tapfdSize && tapfd[i] >= 0; i++)
|
for (i = 0; i < *tapfdSize && tapfd[i] >= 0; i++)
|
||||||
@ -525,7 +525,7 @@ qemuOpenVhostNet(virDomainDefPtr def,
|
|||||||
virDomainAuditNetDevice(def, net, "/dev/vhost-net", *vhostfdSize);
|
virDomainAuditNetDevice(def, net, "/dev/vhost-net", *vhostfdSize);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
while (i--)
|
while (i--)
|
||||||
VIR_FORCE_CLOSE(vhostfd[i]);
|
VIR_FORCE_CLOSE(vhostfd[i]);
|
||||||
|
|
||||||
@ -579,7 +579,7 @@ qemuNetworkPrepareDevices(virDomainDefPtr def)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1155,7 +1155,7 @@ int qemuDomainCCWAddressAssign(virDomainDeviceInfoPtr dev,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(addr);
|
VIR_FREE(addr);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1274,7 +1274,7 @@ qemuDomainCCWAddressSetCreate(void)
|
|||||||
addrs->next.assigned = 0;
|
addrs->next.assigned = 0;
|
||||||
return addrs;
|
return addrs;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
qemuDomainCCWAddressSetFree(addrs);
|
qemuDomainCCWAddressSetFree(addrs);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -1329,7 +1329,7 @@ qemuDomainAssignS390Addresses(virDomainDefPtr def,
|
|||||||
}
|
}
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
qemuDomainCCWAddressSetFree(addrs);
|
qemuDomainCCWAddressSetFree(addrs);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -1459,7 +1459,7 @@ int qemuDomainAssignSpaprVIOAddresses(virDomainDefPtr def,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1866,7 +1866,7 @@ qemuCollectPCIAddress(virDomainDefPtr def ATTRIBUTE_UNUSED,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1967,7 +1967,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
qemuDomainPCIAddressSetFree(addrs);
|
qemuDomainPCIAddressSetFree(addrs);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -2050,7 +2050,7 @@ qemuDomainPCIAddressSetCreate(virDomainDefPtr def,
|
|||||||
|
|
||||||
return addrs;
|
return addrs;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
qemuDomainPCIAddressSetFree(addrs);
|
qemuDomainPCIAddressSetFree(addrs);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -2130,7 +2130,7 @@ qemuDomainPCIAddressReserveAddr(qemuDomainPCIAddressSetPtr addrs,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(addrStr);
|
VIR_FREE(addrStr);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -2180,7 +2180,7 @@ int qemuDomainPCIAddressEnsureAddr(qemuDomainPCIAddressSetPtr addrs,
|
|||||||
ret = qemuDomainPCIAddressReserveNextSlot(addrs, dev, flags);
|
ret = qemuDomainPCIAddressReserveNextSlot(addrs, dev, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(addrStr);
|
VIR_FREE(addrStr);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -2212,7 +2212,7 @@ qemuDomainPCIAddressReleaseSlot(qemuDomainPCIAddressSetPtr addrs,
|
|||||||
|
|
||||||
addrs->buses[addr->bus].slots[addr->slot] = 0;
|
addrs->buses[addr->bus].slots[addr->slot] = 0;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(addrStr);
|
VIR_FREE(addrStr);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -2303,11 +2303,11 @@ qemuDomainPCIAddressGetNextSlot(qemuDomainPCIAddressSetPtr addrs,
|
|||||||
|
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
"%s", _("No more available PCI slots"));
|
"%s", _("No more available PCI slots"));
|
||||||
error:
|
error:
|
||||||
VIR_FREE(addrStr);
|
VIR_FREE(addrStr);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
success:
|
success:
|
||||||
VIR_DEBUG("Found free PCI slot %.4x:%.2x:%.2x",
|
VIR_DEBUG("Found free PCI slot %.4x:%.2x:%.2x",
|
||||||
a.domain, a.bus, a.slot);
|
a.domain, a.bus, a.slot);
|
||||||
*next_addr = a;
|
*next_addr = a;
|
||||||
@ -2499,7 +2499,7 @@ qemuValidateDevicePCISlotsPIIX3(virDomainDefPtr def,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(addrStr);
|
VIR_FREE(addrStr);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -2669,7 +2669,7 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(addrStr);
|
VIR_FREE(addrStr);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -2995,7 +2995,7 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3111,7 +3111,7 @@ qemuBuildDeviceAddressStr(virBufferPtr buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(devStr);
|
VIR_FREE(devStr);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -3243,7 +3243,7 @@ qemuGetSecretString(virConnectPtr conn,
|
|||||||
secret = base64;
|
secret = base64;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(sec);
|
virObjectUnref(sec);
|
||||||
return secret;
|
return secret;
|
||||||
}
|
}
|
||||||
@ -3290,7 +3290,7 @@ static int qemuAddRBDHost(virDomainDiskDefPtr disk, char *hostport)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(disk->src.hosts[disk->src.nhosts-1].port);
|
VIR_FREE(disk->src.hosts[disk->src.nhosts-1].port);
|
||||||
VIR_FREE(disk->src.hosts[disk->src.nhosts-1].name);
|
VIR_FREE(disk->src.hosts[disk->src.nhosts-1].name);
|
||||||
return -1;
|
return -1;
|
||||||
@ -3359,7 +3359,7 @@ static int qemuParseRBDString(virDomainDiskDefPtr disk)
|
|||||||
VIR_FREE(options);
|
VIR_FREE(options);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(options);
|
VIR_FREE(options);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -3441,12 +3441,12 @@ qemuParseDriveURIString(virDomainDiskDefPtr def, virURIPtr uri,
|
|||||||
def->src.nhosts = 1;
|
def->src.nhosts = 1;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virURIFree(uri);
|
virURIFree(uri);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virDomainDiskHostDefClear(def->src.hosts);
|
virDomainDiskHostDefClear(def->src.hosts);
|
||||||
VIR_FREE(def->src.hosts);
|
VIR_FREE(def->src.hosts);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -3549,7 +3549,7 @@ qemuParseNBDString(virDomainDiskDefPtr disk)
|
|||||||
disk->src.hosts = h;
|
disk->src.hosts = h;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virDomainDiskHostDefClear(h);
|
virDomainDiskHostDefClear(h);
|
||||||
VIR_FREE(h);
|
VIR_FREE(h);
|
||||||
return -1;
|
return -1;
|
||||||
@ -3813,7 +3813,7 @@ qemuBuildNetworkDriveURI(int protocol,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
virURIFree(uri);
|
virURIFree(uri);
|
||||||
|
|
||||||
@ -3907,7 +3907,7 @@ qemuDomainDiskGetSourceString(virConnectPtr conn,
|
|||||||
secret,
|
secret,
|
||||||
source);
|
source);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(secret);
|
VIR_FREE(secret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -4270,7 +4270,7 @@ qemuBuildDriveStr(virConnectPtr conn,
|
|||||||
|
|
||||||
return virBufferContentAndReset(&opt);
|
return virBufferContentAndReset(&opt);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(source);
|
VIR_FREE(source);
|
||||||
virBufferFreeAndReset(&opt);
|
virBufferFreeAndReset(&opt);
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -4612,7 +4612,7 @@ qemuBuildDriveDevStr(virDomainDefPtr def,
|
|||||||
|
|
||||||
return virBufferContentAndReset(&opt);
|
return virBufferContentAndReset(&opt);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&opt);
|
virBufferFreeAndReset(&opt);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -4688,7 +4688,7 @@ char *qemuBuildFSStr(virDomainFSDefPtr fs,
|
|||||||
|
|
||||||
return virBufferContentAndReset(&opt);
|
return virBufferContentAndReset(&opt);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&opt);
|
virBufferFreeAndReset(&opt);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -4722,7 +4722,7 @@ qemuBuildFSDevStr(virDomainDefPtr def,
|
|||||||
|
|
||||||
return virBufferContentAndReset(&opt);
|
return virBufferContentAndReset(&opt);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&opt);
|
virBufferFreeAndReset(&opt);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -4948,7 +4948,7 @@ qemuBuildControllerDevStr(virDomainDefPtr domainDef,
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -5061,7 +5061,7 @@ qemuBuildNicDevStr(virDomainDefPtr def,
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -5226,7 +5226,7 @@ qemuBuildWatchdogDevStr(virDomainDefPtr def,
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -5267,7 +5267,7 @@ qemuBuildMemballoonDevStr(virDomainDefPtr def,
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -5294,7 +5294,7 @@ qemuBuildNVRAMDevStr(virDomainNVRAMDefPtr dev)
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -5330,7 +5330,7 @@ qemuBuildUSBInputDevStr(virDomainDefPtr def,
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -5383,7 +5383,7 @@ qemuBuildSoundDevStr(virDomainDefPtr def,
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -5427,7 +5427,7 @@ qemuBuildSoundCodecStr(virDomainSoundDefPtr sound,
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -5498,7 +5498,7 @@ qemuBuildDeviceVideoStr(virDomainDefPtr def,
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -5574,7 +5574,7 @@ qemuBuildPCIHostdevDevStr(virDomainDefPtr def,
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -5678,7 +5678,7 @@ qemuBuildRedirdevDevStr(virDomainDefPtr def,
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -5718,7 +5718,7 @@ qemuBuildUSBHostdevDevStr(virDomainDefPtr def,
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -5756,7 +5756,7 @@ qemuBuildHubDevStr(virDomainDefPtr def,
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -5825,7 +5825,7 @@ qemuBuildSCSIHostdevDrvStr(virDomainHostdevDefPtr dev,
|
|||||||
|
|
||||||
VIR_FREE(sg);
|
VIR_FREE(sg);
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
error:
|
error:
|
||||||
VIR_FREE(sg);
|
VIR_FREE(sg);
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -5889,7 +5889,7 @@ qemuBuildSCSIHostdevDevStr(virDomainDefPtr def,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -6010,7 +6010,7 @@ qemuBuildChrChardevStr(virDomainChrSourceDefPtr dev, const char *alias,
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -6105,7 +6105,7 @@ qemuBuildChrArgStr(virDomainChrSourceDefPtr dev, const char *prefix)
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -6185,7 +6185,7 @@ qemuBuildVirtioSerialPortDevStr(virDomainChrDefPtr dev,
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -6217,7 +6217,7 @@ qemuBuildSclpDevStr(virDomainChrDefPtr dev)
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -6275,7 +6275,7 @@ qemuBuildRNGBackendArgs(virCommandPtr cmd,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
VIR_FREE(backend);
|
VIR_FREE(backend);
|
||||||
return ret;
|
return ret;
|
||||||
@ -6324,7 +6324,7 @@ qemuBuildRNGDeviceArgs(virCommandPtr cmd,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -6444,7 +6444,7 @@ static char *qemuBuildSmbiosBiosStr(virSysinfoDefPtr def)
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -6491,7 +6491,7 @@ static char *qemuBuildSmbiosSystemStr(virSysinfoDefPtr def, bool skip_uuid)
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -6595,7 +6595,7 @@ qemuBuildClockArgStr(virDomainClockDefPtr def)
|
|||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
return virBufferContentAndReset(&buf);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -6838,7 +6838,7 @@ qemuBuildCpuArgStr(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(compare_msg);
|
VIR_FREE(compare_msg);
|
||||||
cpuDataFree(data);
|
cpuDataFree(data);
|
||||||
virCPUDefFree(guest);
|
virCPUDefFree(guest);
|
||||||
@ -7085,7 +7085,7 @@ qemuBuildNumaArgStr(const virDomainDef *def, virCommandPtr cmd)
|
|||||||
}
|
}
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cpumask);
|
VIR_FREE(cpumask);
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
return ret;
|
return ret;
|
||||||
@ -7231,7 +7231,7 @@ qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfigPtr cfg,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(netAddr);
|
VIR_FREE(netAddr);
|
||||||
virBufferFreeAndReset(&opt);
|
virBufferFreeAndReset(&opt);
|
||||||
return -1;
|
return -1;
|
||||||
@ -7456,7 +7456,7 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(netAddr);
|
VIR_FREE(netAddr);
|
||||||
virBufferFreeAndReset(&opt);
|
virBufferFreeAndReset(&opt);
|
||||||
return -1;
|
return -1;
|
||||||
@ -7657,7 +7657,7 @@ qemuBuildInterfaceCommandLine(virCommandPtr cmd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
virDomainConfNWFilterTeardown(net);
|
virDomainConfNWFilterTeardown(net);
|
||||||
for (i = 0; tapfd && i < tapfdSize && tapfd[i] >= 0; i++) {
|
for (i = 0; tapfd && i < tapfdSize && tapfd[i] >= 0; i++) {
|
||||||
@ -9742,7 +9742,7 @@ qemuBuildCommandLine(virConnectPtr conn,
|
|||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return cmd;
|
return cmd;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
/* free up any resources in the network driver
|
/* free up any resources in the network driver
|
||||||
* but don't overwrite the original error */
|
* but don't overwrite the original error */
|
||||||
@ -9808,7 +9808,7 @@ qemuBuildSerialChrDeviceStr(char **deviceStr,
|
|||||||
*deviceStr = virBufferContentAndReset(&cmd);
|
*deviceStr = virBufferContentAndReset(&cmd);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virBufferFreeAndReset(&cmd);
|
virBufferFreeAndReset(&cmd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -9861,7 +9861,7 @@ qemuBuildChannelChrDeviceStr(char **deviceStr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(addr);
|
VIR_FREE(addr);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -9896,7 +9896,7 @@ qemuBuildConsoleChrDeviceStr(char **deviceStr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -10029,7 +10029,7 @@ static int qemuStringToArgvEnv(const char *args,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(progenv);
|
VIR_FREE(progenv);
|
||||||
VIR_FREE(progargv);
|
VIR_FREE(progargv);
|
||||||
virStringFreeList(arglist);
|
virStringFreeList(arglist);
|
||||||
@ -10151,7 +10151,7 @@ qemuParseKeywords(const char *str,
|
|||||||
*retnkeywords = keywordCount;
|
*retnkeywords = keywordCount;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
for (i = 0; i < keywordCount; i++) {
|
for (i = 0; i < keywordCount; i++) {
|
||||||
VIR_FREE(keywords[i]);
|
VIR_FREE(keywords[i]);
|
||||||
VIR_FREE(values[i]);
|
VIR_FREE(values[i]);
|
||||||
@ -10481,7 +10481,7 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt,
|
|||||||
/* fall through to "cleanup" */
|
/* fall through to "cleanup" */
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
for (i = 0; i < nkeywords; i++) {
|
for (i = 0; i < nkeywords; i++) {
|
||||||
VIR_FREE(keywords[i]);
|
VIR_FREE(keywords[i]);
|
||||||
VIR_FREE(values[i]);
|
VIR_FREE(values[i]);
|
||||||
@ -10490,7 +10490,7 @@ cleanup:
|
|||||||
VIR_FREE(values);
|
VIR_FREE(values);
|
||||||
return def;
|
return def;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virDomainDiskDefFree(def);
|
virDomainDiskDefFree(def);
|
||||||
def = NULL;
|
def = NULL;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -10677,7 +10677,7 @@ qemuParseCommandLineNet(virDomainXMLOptionPtr xmlopt,
|
|||||||
if (genmac)
|
if (genmac)
|
||||||
virDomainNetGenerateMAC(xmlopt, &def->mac);
|
virDomainNetGenerateMAC(xmlopt, &def->mac);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
for (i = 0; i < nkeywords; i++) {
|
for (i = 0; i < nkeywords; i++) {
|
||||||
VIR_FREE(keywords[i]);
|
VIR_FREE(keywords[i]);
|
||||||
VIR_FREE(values[i]);
|
VIR_FREE(values[i]);
|
||||||
@ -10907,7 +10907,7 @@ qemuParseCommandLineChr(virDomainChrSourceDefPtr source,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -11112,13 +11112,13 @@ qemuParseCommandLineCPU(virDomainDefPtr dom,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(model);
|
VIR_FREE(model);
|
||||||
virStringFreeList(tokens);
|
virStringFreeList(tokens);
|
||||||
virStringFreeList(hv_tokens);
|
virStringFreeList(hv_tokens);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
syntax:
|
syntax:
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("unknown CPU syntax '%s'"), val);
|
_("unknown CPU syntax '%s'"), val);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -11181,7 +11181,7 @@ qemuParseCommandLineSmp(virDomainDefPtr dom,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
for (i = 0; i < nkws; i++) {
|
for (i = 0; i < nkws; i++) {
|
||||||
VIR_FREE(kws[i]);
|
VIR_FREE(kws[i]);
|
||||||
VIR_FREE(vals[i]);
|
VIR_FREE(vals[i]);
|
||||||
@ -11191,10 +11191,10 @@ cleanup:
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
syntax:
|
syntax:
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("cannot parse CPU topology '%s'"), val);
|
_("cannot parse CPU topology '%s'"), val);
|
||||||
error:
|
error:
|
||||||
ret = -1;
|
ret = -1;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -12167,7 +12167,7 @@ qemuParseCommandLine(virCapsPtr qemuCaps,
|
|||||||
|
|
||||||
return def;
|
return def;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virDomainDiskDefFree(disk);
|
virDomainDiskDefFree(disk);
|
||||||
qemuDomainCmdlineDefFree(cmd);
|
qemuDomainCmdlineDefFree(cmd);
|
||||||
virDomainDefFree(def);
|
virDomainDefFree(def);
|
||||||
@ -12199,7 +12199,7 @@ virDomainDefPtr qemuParseCommandLineString(virCapsPtr qemuCaps,
|
|||||||
def = qemuParseCommandLine(qemuCaps, xmlopt, progenv, progargv,
|
def = qemuParseCommandLine(qemuCaps, xmlopt, progenv, progargv,
|
||||||
pidfile, monConfig, monJSON);
|
pidfile, monConfig, monJSON);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virStringFreeList(progargv);
|
virStringFreeList(progargv);
|
||||||
virStringFreeList(progenv);
|
virStringFreeList(progenv);
|
||||||
|
|
||||||
@ -12246,7 +12246,7 @@ static int qemuParseProcFileStrings(int pid_value,
|
|||||||
ret = nstr-1;
|
ret = nstr-1;
|
||||||
*list = str;
|
*list = str;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
virStringFreeList(str);
|
virStringFreeList(str);
|
||||||
VIR_FREE(data);
|
VIR_FREE(data);
|
||||||
@ -12290,7 +12290,7 @@ virDomainDefPtr qemuParseCommandLinePid(virCapsPtr qemuCaps,
|
|||||||
VIR_FREE(def->emulator);
|
VIR_FREE(def->emulator);
|
||||||
def->emulator = emulator;
|
def->emulator = emulator;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(exepath);
|
VIR_FREE(exepath);
|
||||||
virStringFreeList(progargv);
|
virStringFreeList(progargv);
|
||||||
virStringFreeList(progenv);
|
virStringFreeList(progenv);
|
||||||
|
@ -257,7 +257,7 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged)
|
|||||||
|
|
||||||
return cfg;
|
return cfg;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -578,7 +578,7 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virConfFree(conf);
|
virConfFree(conf);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -662,7 +662,7 @@ virCapsPtr virQEMUDriverCreateCapabilities(virQEMUDriverPtr driver)
|
|||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return caps;
|
return caps;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(sec_managers);
|
VIR_FREE(sec_managers);
|
||||||
virObjectUnref(caps);
|
virObjectUnref(caps);
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
@ -806,7 +806,7 @@ qemuCheckSharedDevice(virHashTablePtr sharedDevices,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = -1;
|
ret = -1;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(sysfs_path);
|
VIR_FREE(sysfs_path);
|
||||||
VIR_FREE(key);
|
VIR_FREE(key);
|
||||||
return ret;
|
return ret;
|
||||||
@ -866,7 +866,7 @@ qemuSharedDeviceEntryCopy(const qemuSharedDeviceEntry *entry)
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
qemuSharedDeviceEntryFree(ret, NULL);
|
qemuSharedDeviceEntryFree(ret, NULL);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -973,7 +973,7 @@ qemuAddSharedDevice(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
qemuDriverUnlock(driver);
|
qemuDriverUnlock(driver);
|
||||||
VIR_FREE(dev_name);
|
VIR_FREE(dev_name);
|
||||||
VIR_FREE(dev_path);
|
VIR_FREE(dev_path);
|
||||||
@ -1067,7 +1067,7 @@ qemuRemoveSharedDevice(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
qemuDriverUnlock(driver);
|
qemuDriverUnlock(driver);
|
||||||
VIR_FREE(dev_name);
|
VIR_FREE(dev_name);
|
||||||
VIR_FREE(dev_path);
|
VIR_FREE(dev_path);
|
||||||
@ -1133,7 +1133,7 @@ qemuSetUnprivSGIO(virDomainDeviceDefPtr dev)
|
|||||||
virSetDeviceUnprivSGIO(path, NULL, val) < 0)
|
virSetDeviceUnprivSGIO(path, NULL, val) < 0)
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(sysfs_path);
|
VIR_FREE(sysfs_path);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1199,7 +1199,7 @@ qemuAddISCSIPoolSourceHost(virDomainDiskDefPtr def,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virStringFreeList(tokens);
|
virStringFreeList(tokens);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1252,7 +1252,7 @@ qemuTranslateDiskSourcePoolAuth(virDomainDiskDefPtr def,
|
|||||||
}
|
}
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1400,7 +1400,7 @@ qemuTranslateDiskSourcePool(virConnectPtr conn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
savedError = virSaveLastError();
|
savedError = virSaveLastError();
|
||||||
if (pool)
|
if (pool)
|
||||||
|
@ -232,7 +232,7 @@ qemuDomainObjPrivateAlloc(void)
|
|||||||
|
|
||||||
return priv;
|
return priv;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(priv);
|
VIR_FREE(priv);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -520,7 +520,7 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, void *data)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virDomainChrSourceDefFree(priv->monConfig);
|
virDomainChrSourceDefFree(priv->monConfig);
|
||||||
priv->monConfig = NULL;
|
priv->monConfig = NULL;
|
||||||
VIR_FREE(nodes);
|
VIR_FREE(nodes);
|
||||||
@ -643,7 +643,7 @@ qemuDomainDefNamespaceParse(xmlDocPtr xml ATTRIBUTE_UNUSED,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(nodes);
|
VIR_FREE(nodes);
|
||||||
qemuDomainDefNamespaceFree(cmd);
|
qemuDomainDefNamespaceFree(cmd);
|
||||||
return -1;
|
return -1;
|
||||||
@ -934,7 +934,7 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1071,7 +1071,7 @@ qemuDomainObjBeginJobInternal(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
virObjectRef(obj);
|
virObjectRef(obj);
|
||||||
|
|
||||||
retry:
|
retry:
|
||||||
if (cfg->maxQueuedJobs &&
|
if (cfg->maxQueuedJobs &&
|
||||||
priv->jobs_queued > cfg->maxQueuedJobs) {
|
priv->jobs_queued > cfg->maxQueuedJobs) {
|
||||||
goto error;
|
goto error;
|
||||||
@ -1119,7 +1119,7 @@ retry:
|
|||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_WARN("Cannot start job (%s, %s) for domain %s;"
|
VIR_WARN("Cannot start job (%s, %s) for domain %s;"
|
||||||
" current job is (%s, %s) owned by (%llu, %llu)",
|
" current job is (%s, %s) owned by (%llu, %llu)",
|
||||||
qemuDomainJobTypeToString(job),
|
qemuDomainJobTypeToString(job),
|
||||||
@ -1451,7 +1451,7 @@ qemuDomainDefCopy(virQEMUDriverPtr driver,
|
|||||||
VIR_DOMAIN_XML_INACTIVE)))
|
VIR_DOMAIN_XML_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(xml);
|
VIR_FREE(xml);
|
||||||
virObjectUnref(caps);
|
virObjectUnref(caps);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1558,7 +1558,7 @@ qemuDomainDefFormatBuf(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
ret = virDomainDefFormatInternal(def, flags, buf);
|
ret = virDomainDefFormatInternal(def, flags, buf);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
def->cpu = def_cpu;
|
def->cpu = def_cpu;
|
||||||
virCPUDefFree(cpu);
|
virCPUDefFree(cpu);
|
||||||
if (controllers) {
|
if (controllers) {
|
||||||
@ -1766,7 +1766,7 @@ qemuDomainOpenLogHelper(virQEMUDriverConfigPtr cfg,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(logfile);
|
VIR_FREE(logfile);
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
@ -1856,7 +1856,7 @@ int qemuDomainAppendLog(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
va_end(argptr);
|
va_end(argptr);
|
||||||
|
|
||||||
if (fd != logFD)
|
if (fd != logFD)
|
||||||
@ -1907,7 +1907,7 @@ qemuDomainSnapshotWriteMetadata(virDomainObjPtr vm,
|
|||||||
|
|
||||||
ret = virXMLSaveFile(snapFile, NULL, "snapshot-edit", newxml);
|
ret = virXMLSaveFile(snapFile, NULL, "snapshot-edit", newxml);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(snapFile);
|
VIR_FREE(snapFile);
|
||||||
VIR_FREE(snapDir);
|
VIR_FREE(snapDir);
|
||||||
VIR_FREE(newxml);
|
VIR_FREE(newxml);
|
||||||
@ -2066,7 +2066,7 @@ qemuDomainSnapshotDiscard(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(snapFile);
|
VIR_FREE(snapFile);
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2150,7 +2150,7 @@ qemuDomainSetFakeReboot(virQEMUDriverPtr driver,
|
|||||||
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
|
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
|
||||||
VIR_WARN("Failed to save status on vm %s", vm->def->name);
|
VIR_WARN("Failed to save status on vm %s", vm->def->name);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2230,7 +2230,7 @@ qemuDomainCheckDiskStartupPolicy(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2266,7 +2266,7 @@ qemuDomainCheckDiskPresence(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2426,7 +2426,7 @@ qemuDomainDetermineDiskChain(virQEMUDriverPtr driver,
|
|||||||
if (!disk->backingChain)
|
if (!disk->backingChain)
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -2469,7 +2469,7 @@ qemuDomainDefCheckABIStability(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
ret = virDomainDefCheckABIStability(migratableDefSrc, migratableDefDst);
|
ret = virDomainDefCheckABIStability(migratableDefSrc, migratableDefDst);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virDomainDefFree(migratableDefSrc);
|
virDomainDefFree(migratableDefSrc);
|
||||||
virDomainDefFree(migratableDefDst);
|
virDomainDefFree(migratableDefDst);
|
||||||
return ret;
|
return ret;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -114,7 +114,7 @@ qemuHostdevHostSupportsPassthroughVFIO(void)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (iommuDir)
|
if (iommuDir)
|
||||||
closedir(iommuDir);
|
closedir(iommuDir);
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ qemuHostdevHostSupportsPassthroughLegacy(void)
|
|||||||
ret = true;
|
ret = true;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FORCE_CLOSE(kvmfd);
|
VIR_FORCE_CLOSE(kvmfd);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -235,7 +235,7 @@ qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
|
|||||||
ret = virHostdevPreparePCIDevices(hostdev_mgr, QEMU_DRIVER_NAME,
|
ret = virHostdevPreparePCIDevices(hostdev_mgr, QEMU_DRIVER_NAME,
|
||||||
name, uuid, hostdevs,
|
name, uuid, hostdevs,
|
||||||
nhostdevs, flags);
|
nhostdevs, flags);
|
||||||
out:
|
out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ int qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
|
|||||||
src, format);
|
src, format);
|
||||||
qemuDomainObjExitMonitor(driver, vm);
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
}
|
}
|
||||||
audit:
|
audit:
|
||||||
if (src)
|
if (src)
|
||||||
virDomainAuditDisk(vm, virDomainDiskGetSource(origdisk),
|
virDomainAuditDisk(vm, virDomainDiskGetSource(origdisk),
|
||||||
src, "update", ret >= 0);
|
src, "update", ret >= 0);
|
||||||
@ -176,12 +176,12 @@ audit:
|
|||||||
|
|
||||||
virDomainDiskDefFree(disk);
|
virDomainDiskDefFree(disk);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(driveAlias);
|
VIR_FREE(driveAlias);
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (virSecurityManagerRestoreImageLabel(driver->securityManager,
|
if (virSecurityManagerRestoreImageLabel(driver->securityManager,
|
||||||
vm->def, disk) < 0)
|
vm->def, disk) < 0)
|
||||||
VIR_WARN("Unable to restore security label on new media %s", src);
|
VIR_WARN("Unable to restore security label on new media %s", src);
|
||||||
@ -229,7 +229,7 @@ qemuDomainCheckEjectableMedia(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virHashFree(table);
|
virHashFree(table);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -337,13 +337,13 @@ qemuDomainAttachVirtioDiskDevice(virConnectPtr conn,
|
|||||||
|
|
||||||
virDomainDiskInsertPreAlloced(vm->def, disk);
|
virDomainDiskInsertPreAlloced(vm->def, disk);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(devstr);
|
VIR_FREE(devstr);
|
||||||
VIR_FREE(drivestr);
|
VIR_FREE(drivestr);
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (releaseaddr)
|
if (releaseaddr)
|
||||||
qemuDomainReleaseDeviceAddress(vm, &disk->info, src);
|
qemuDomainReleaseDeviceAddress(vm, &disk->info, src);
|
||||||
|
|
||||||
@ -429,7 +429,7 @@ int qemuDomainAttachControllerDevice(virQEMUDriverPtr driver,
|
|||||||
virDomainControllerInsertPreAlloced(vm->def, controller);
|
virDomainControllerInsertPreAlloced(vm->def, controller);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret != 0 && releaseaddr)
|
if (ret != 0 && releaseaddr)
|
||||||
qemuDomainReleaseDeviceAddress(vm, &controller->info, NULL);
|
qemuDomainReleaseDeviceAddress(vm, &controller->info, NULL);
|
||||||
|
|
||||||
@ -590,13 +590,13 @@ qemuDomainAttachSCSIDisk(virConnectPtr conn,
|
|||||||
|
|
||||||
virDomainDiskInsertPreAlloced(vm->def, disk);
|
virDomainDiskInsertPreAlloced(vm->def, disk);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(devstr);
|
VIR_FREE(devstr);
|
||||||
VIR_FREE(drivestr);
|
VIR_FREE(drivestr);
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (virSecurityManagerRestoreImageLabel(driver->securityManager,
|
if (virSecurityManagerRestoreImageLabel(driver->securityManager,
|
||||||
vm->def, disk) < 0)
|
vm->def, disk) < 0)
|
||||||
VIR_WARN("Unable to restore security label on %s", src);
|
VIR_WARN("Unable to restore security label on %s", src);
|
||||||
@ -684,13 +684,13 @@ qemuDomainAttachUSBMassstorageDevice(virConnectPtr conn,
|
|||||||
|
|
||||||
virDomainDiskInsertPreAlloced(vm->def, disk);
|
virDomainDiskInsertPreAlloced(vm->def, disk);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(devstr);
|
VIR_FREE(devstr);
|
||||||
VIR_FREE(drivestr);
|
VIR_FREE(drivestr);
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (virSecurityManagerRestoreImageLabel(driver->securityManager,
|
if (virSecurityManagerRestoreImageLabel(driver->securityManager,
|
||||||
vm->def, disk) < 0)
|
vm->def, disk) < 0)
|
||||||
VIR_WARN("Unable to restore security label on %s", src);
|
VIR_WARN("Unable to restore security label on %s", src);
|
||||||
@ -809,7 +809,7 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
|
|||||||
NULLSTR(src));
|
NULLSTR(src));
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
ignore_value(qemuRemoveSharedDevice(driver, dev, vm->def->name));
|
ignore_value(qemuRemoveSharedDevice(driver, dev, vm->def->name));
|
||||||
virObjectUnref(caps);
|
virObjectUnref(caps);
|
||||||
@ -1076,7 +1076,7 @@ int qemuDomainAttachNetDevice(virConnectPtr conn,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
vm->def->nets[vm->def->nnets++] = net;
|
vm->def->nets[vm->def->nnets++] = net;
|
||||||
} else {
|
} else {
|
||||||
@ -1127,7 +1127,7 @@ cleanup:
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
try_remove:
|
try_remove:
|
||||||
if (!virDomainObjIsActive(vm))
|
if (!virDomainObjIsActive(vm))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -1282,7 +1282,7 @@ qemuDomainAttachHostPCIDevice(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (teardowncgroup && qemuTeardownHostdevCgroup(vm, hostdev) < 0)
|
if (teardowncgroup && qemuTeardownHostdevCgroup(vm, hostdev) < 0)
|
||||||
VIR_WARN("Unable to remove host device cgroup ACL on hotplug fail");
|
VIR_WARN("Unable to remove host device cgroup ACL on hotplug fail");
|
||||||
if (teardownlabel &&
|
if (teardownlabel &&
|
||||||
@ -1299,7 +1299,7 @@ error:
|
|||||||
VIR_FREE(configfd_name);
|
VIR_FREE(configfd_name);
|
||||||
VIR_FORCE_CLOSE(configfd);
|
VIR_FORCE_CLOSE(configfd);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -1341,7 +1341,7 @@ int qemuDomainAttachRedirdevDevice(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(devstr);
|
VIR_FREE(devstr);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -1467,7 +1467,7 @@ int qemuDomainAttachChrDevice(virQEMUDriverPtr driver,
|
|||||||
qemuDomainObjExitMonitor(driver, vm);
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0 && need_remove)
|
if (ret < 0 && need_remove)
|
||||||
qemuDomainChrRemove(vmdef, chr);
|
qemuDomainChrRemove(vmdef, chr);
|
||||||
VIR_FREE(charAlias);
|
VIR_FREE(charAlias);
|
||||||
@ -1526,7 +1526,7 @@ qemuDomainAttachHostUSBDevice(virQEMUDriverPtr driver,
|
|||||||
vm->def->hostdevs[vm->def->nhostdevs++] = hostdev;
|
vm->def->hostdevs[vm->def->nhostdevs++] = hostdev;
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
if (teardowncgroup && qemuTeardownHostdevCgroup(vm, hostdev) < 0)
|
if (teardowncgroup && qemuTeardownHostdevCgroup(vm, hostdev) < 0)
|
||||||
VIR_WARN("Unable to remove host device cgroup ACL on hotplug fail");
|
VIR_WARN("Unable to remove host device cgroup ACL on hotplug fail");
|
||||||
@ -1622,7 +1622,7 @@ qemuDomainAttachHostSCSIDevice(virQEMUDriverPtr driver,
|
|||||||
vm->def->hostdevs[vm->def->nhostdevs++] = hostdev;
|
vm->def->hostdevs[vm->def->nhostdevs++] = hostdev;
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
qemuDomainReAttachHostSCSIDevices(driver, vm->def->name, &hostdev, 1);
|
qemuDomainReAttachHostSCSIDevices(driver, vm->def->name, &hostdev, 1);
|
||||||
if (teardowncgroup && qemuTeardownHostdevCgroup(vm, hostdev) < 0)
|
if (teardowncgroup && qemuTeardownHostdevCgroup(vm, hostdev) < 0)
|
||||||
@ -1676,7 +1676,7 @@ int qemuDomainAttachHostDevice(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1742,7 +1742,7 @@ qemuDomainNetGetBridgeName(virConnectPtr conn, virDomainNetDefPtr net)
|
|||||||
virDomainNetGetActualType(net));
|
virDomainNetGetActualType(net));
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
return brname;
|
return brname;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1797,7 +1797,7 @@ qemuDomainChangeNetBridge(virConnectPtr conn,
|
|||||||
}
|
}
|
||||||
/* caller will replace entire olddev with newdev in domain nets list */
|
/* caller will replace entire olddev with newdev in domain nets list */
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(oldbridge);
|
VIR_FREE(oldbridge);
|
||||||
VIR_FREE(newbridge);
|
VIR_FREE(newbridge);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1865,7 +1865,7 @@ int qemuDomainChangeNetLinkState(virQEMUDriverPtr driver,
|
|||||||
/* modify the device configuration */
|
/* modify the device configuration */
|
||||||
dev->linkstate = linkstate;
|
dev->linkstate = linkstate;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
qemuDomainObjExitMonitor(driver, vm);
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -2226,7 +2226,7 @@ qemuDomainChangeNet(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
/* When we get here, we will be in one of these two states:
|
/* When we get here, we will be in one of these two states:
|
||||||
*
|
*
|
||||||
* 1) newdev has been moved into the domain's list of nets and
|
* 1) newdev has been moved into the domain's list of nets and
|
||||||
@ -2430,7 +2430,7 @@ qemuDomainChangeGraphics(virQEMUDriverPtr driver,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -2894,7 +2894,7 @@ qemuDomainDetachVirtioDiskDevice(virQEMUDriverPtr driver,
|
|||||||
qemuDomainRemoveDiskDevice(driver, vm, detach);
|
qemuDomainRemoveDiskDevice(driver, vm, detach);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
qemuDomainResetDeviceRemoval(vm);
|
qemuDomainResetDeviceRemoval(vm);
|
||||||
VIR_FREE(drivestr);
|
VIR_FREE(drivestr);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2948,7 +2948,7 @@ qemuDomainDetachDiskDevice(virQEMUDriverPtr driver,
|
|||||||
qemuDomainRemoveDiskDevice(driver, vm, detach);
|
qemuDomainRemoveDiskDevice(driver, vm, detach);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
qemuDomainResetDeviceRemoval(vm);
|
qemuDomainResetDeviceRemoval(vm);
|
||||||
VIR_FREE(drivestr);
|
VIR_FREE(drivestr);
|
||||||
return ret;
|
return ret;
|
||||||
@ -3134,7 +3134,7 @@ int qemuDomainDetachControllerDevice(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
qemuDomainResetDeviceRemoval(vm);
|
qemuDomainResetDeviceRemoval(vm);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -3251,7 +3251,7 @@ qemuDomainDetachHostSCSIDevice(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
qemuDomainObjExitMonitor(driver, vm);
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(drvstr);
|
VIR_FREE(drvstr);
|
||||||
VIR_FREE(devstr);
|
VIR_FREE(devstr);
|
||||||
return ret;
|
return ret;
|
||||||
@ -3457,7 +3457,7 @@ qemuDomainDetachNetDevice(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
qemuDomainResetDeviceRemoval(vm);
|
qemuDomainResetDeviceRemoval(vm);
|
||||||
VIR_FREE(hostnet_name);
|
VIR_FREE(hostnet_name);
|
||||||
return ret;
|
return ret;
|
||||||
@ -3527,9 +3527,9 @@ qemuDomainChangeGraphicsPasswords(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
end_job:
|
end_job:
|
||||||
qemuDomainObjExitMonitor(driver, vm);
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -3553,7 +3553,7 @@ int qemuDomainAttachLease(virQEMUDriverPtr driver,
|
|||||||
virDomainLeaseInsertPreAlloced(vm->def, lease);
|
virDomainLeaseInsertPreAlloced(vm->def, lease);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -3621,7 +3621,7 @@ int qemuDomainDetachChrDevice(virQEMUDriverPtr driver,
|
|||||||
qemuDomainRemoveChrDevice(driver, vm, tmpChr);
|
qemuDomainRemoveChrDevice(driver, vm, tmpChr);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
qemuDomainResetDeviceRemoval(vm);
|
qemuDomainResetDeviceRemoval(vm);
|
||||||
VIR_FREE(devstr);
|
VIR_FREE(devstr);
|
||||||
VIR_FREE(charAlias);
|
VIR_FREE(charAlias);
|
||||||
|
@ -268,7 +268,7 @@ qemuDomainExtractTLSSubject(const char *certdir)
|
|||||||
|
|
||||||
return subject;
|
return subject;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(certfile);
|
VIR_FREE(certfile);
|
||||||
VIR_FREE(pemdata);
|
VIR_FREE(pemdata);
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -320,7 +320,7 @@ qemuMigrationCookieGraphicsAlloc(virQEMUDriverPtr driver,
|
|||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return mig;
|
return mig;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
qemuMigrationCookieGraphicsFree(mig);
|
qemuMigrationCookieGraphicsFree(mig);
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -373,7 +373,7 @@ qemuMigrationCookieNetworkAlloc(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
|
|||||||
}
|
}
|
||||||
return mig;
|
return mig;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
qemuMigrationCookieNetworkFree(mig);
|
qemuMigrationCookieNetworkFree(mig);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -406,7 +406,7 @@ qemuMigrationCookieNew(virDomainObjPtr dom)
|
|||||||
|
|
||||||
return mig;
|
return mig;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
qemuMigrationCookieFree(mig);
|
qemuMigrationCookieFree(mig);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -719,7 +719,7 @@ qemuMigrationCookieGraphicsXMLParse(xmlXPathContextPtr ctxt)
|
|||||||
|
|
||||||
return grap;
|
return grap;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
qemuMigrationCookieGraphicsFree(grap);
|
qemuMigrationCookieGraphicsFree(grap);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -763,11 +763,11 @@ qemuMigrationCookieNetworkXMLParse(xmlXPathContextPtr ctxt)
|
|||||||
|
|
||||||
VIR_FREE(interfaces);
|
VIR_FREE(interfaces);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
ctxt->node = save_ctxt;
|
ctxt->node = save_ctxt;
|
||||||
return optr;
|
return optr;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(interfaces);
|
VIR_FREE(interfaces);
|
||||||
qemuMigrationCookieNetworkFree(optr);
|
qemuMigrationCookieNetworkFree(optr);
|
||||||
optr = NULL;
|
optr = NULL;
|
||||||
@ -953,7 +953,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
|
|||||||
virObjectUnref(caps);
|
virObjectUnref(caps);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(tmp);
|
VIR_FREE(tmp);
|
||||||
VIR_FREE(nodes);
|
VIR_FREE(nodes);
|
||||||
virObjectUnref(caps);
|
virObjectUnref(caps);
|
||||||
@ -978,7 +978,7 @@ qemuMigrationCookieXMLParseStr(qemuMigrationCookiePtr mig,
|
|||||||
|
|
||||||
ret = qemuMigrationCookieXMLParse(mig, driver, doc, ctxt, flags);
|
ret = qemuMigrationCookieXMLParse(mig, driver, doc, ctxt, flags);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
xmlXPathFreeContext(ctxt);
|
xmlXPathFreeContext(ctxt);
|
||||||
xmlFreeDoc(doc);
|
xmlFreeDoc(doc);
|
||||||
|
|
||||||
@ -1080,7 +1080,7 @@ qemuMigrationEatCookie(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
return mig;
|
return mig;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
qemuMigrationCookieFree(mig);
|
qemuMigrationCookieFree(mig);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -1188,7 +1188,7 @@ qemuMigrationStartNBDServer(virQEMUDriverPtr driver,
|
|||||||
priv->nbdPort = port;
|
priv->nbdPort = port;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(diskAlias);
|
VIR_FREE(diskAlias);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
virPortAllocatorRelease(driver->remotePorts, port);
|
virPortAllocatorRelease(driver->remotePorts, port);
|
||||||
@ -1337,13 +1337,13 @@ qemuMigrationDriveMirror(virQEMUDriverPtr driver,
|
|||||||
QEMU_MONITOR_MIGRATE_NON_SHARED_INC);
|
QEMU_MONITOR_MIGRATE_NON_SHARED_INC);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(diskAlias);
|
VIR_FREE(diskAlias);
|
||||||
VIR_FREE(nbd_dest);
|
VIR_FREE(nbd_dest);
|
||||||
VIR_FREE(hoststr);
|
VIR_FREE(hoststr);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
/* don't overwrite any errors */
|
/* don't overwrite any errors */
|
||||||
err = virSaveLastError();
|
err = virSaveLastError();
|
||||||
/* cancel any outstanding jobs */
|
/* cancel any outstanding jobs */
|
||||||
@ -1432,7 +1432,7 @@ qemuMigrationCancelDriveMirror(qemuMigrationCookiePtr mig,
|
|||||||
qemuDomainObjExitMonitor(driver, vm);
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(diskAlias);
|
VIR_FREE(diskAlias);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1617,7 +1617,7 @@ qemuMigrationSetCompression(virQEMUDriverPtr driver,
|
|||||||
priv->mon,
|
priv->mon,
|
||||||
QEMU_MONITOR_MIGRATION_CAPS_XBZRLE);
|
QEMU_MONITOR_MIGRATION_CAPS_XBZRLE);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
qemuDomainObjExitMonitor(driver, vm);
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1651,7 +1651,7 @@ qemuMigrationSetAutoConverge(virQEMUDriverPtr driver,
|
|||||||
priv->mon,
|
priv->mon,
|
||||||
QEMU_MONITOR_MIGRATION_CAPS_AUTO_CONVERGE);
|
QEMU_MONITOR_MIGRATION_CAPS_AUTO_CONVERGE);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
qemuDomainObjExitMonitor(driver, vm);
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1834,13 +1834,13 @@ qemuMigrationWaitForCompletion(virQEMUDriverPtr driver, virDomainObjPtr vm,
|
|||||||
virObjectLock(vm);
|
virObjectLock(vm);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (priv->job.info.type == VIR_DOMAIN_JOB_COMPLETED)
|
if (priv->job.info.type == VIR_DOMAIN_JOB_COMPLETED)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
cancel:
|
cancel:
|
||||||
if (virDomainObjIsActive(vm)) {
|
if (virDomainObjIsActive(vm)) {
|
||||||
if (qemuDomainObjEnterMonitorAsync(driver, vm,
|
if (qemuDomainObjEnterMonitorAsync(driver, vm,
|
||||||
priv->job.asyncJob) == 0) {
|
priv->job.asyncJob) == 0) {
|
||||||
@ -1938,7 +1938,7 @@ qemuDomainMigrateGraphicsRelocate(virQEMUDriverPtr driver,
|
|||||||
qemuDomainObjExitMonitor(driver, vm);
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virURIFree(uri);
|
virURIFree(uri);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1976,7 +1976,7 @@ qemuDomainMigrateOPDRelocate(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2039,7 +2039,7 @@ qemuMigrationCleanup(virDomainObjPtr vm,
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
return vm;
|
return vm;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2138,7 +2138,7 @@ static char
|
|||||||
rv = qemuDomainDefFormatLive(driver, vm->def, false, true);
|
rv = qemuDomainDefFormatLive(driver, vm->def, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
qemuMigrationCookieFree(mig);
|
qemuMigrationCookieFree(mig);
|
||||||
virObjectUnref(caps);
|
virObjectUnref(caps);
|
||||||
virDomainDefFree(def);
|
virDomainDefFree(def);
|
||||||
@ -2208,12 +2208,12 @@ qemuMigrationBegin(virConnectPtr conn,
|
|||||||
goto endjob;
|
goto endjob;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (vm)
|
if (vm)
|
||||||
virObjectUnlock(vm);
|
virObjectUnlock(vm);
|
||||||
return xml;
|
return xml;
|
||||||
|
|
||||||
endjob:
|
endjob:
|
||||||
if ((flags & VIR_MIGRATE_CHANGE_PROTECTION)) {
|
if ((flags & VIR_MIGRATE_CHANGE_PROTECTION)) {
|
||||||
if (qemuMigrationJobFinish(driver, vm) == 0)
|
if (qemuMigrationJobFinish(driver, vm) == 0)
|
||||||
vm = NULL;
|
vm = NULL;
|
||||||
@ -2497,7 +2497,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
|
|||||||
VIR_DEBUG("Received no lockstate");
|
VIR_DEBUG("Received no lockstate");
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
if (flags & VIR_MIGRATE_OFFLINE)
|
if (flags & VIR_MIGRATE_OFFLINE)
|
||||||
cookieFlags = 0;
|
cookieFlags = 0;
|
||||||
else
|
else
|
||||||
@ -2547,7 +2547,7 @@ done:
|
|||||||
priv->migrationPort = port;
|
priv->migrationPort = port;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(migrateFrom);
|
VIR_FREE(migrateFrom);
|
||||||
VIR_FREE(xmlout);
|
VIR_FREE(xmlout);
|
||||||
VIR_FORCE_CLOSE(dataFD[0]);
|
VIR_FORCE_CLOSE(dataFD[0]);
|
||||||
@ -2568,11 +2568,11 @@ cleanup:
|
|||||||
virObjectUnref(caps);
|
virObjectUnref(caps);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
stop:
|
stop:
|
||||||
virDomainAuditStart(vm, "migrated", false);
|
virDomainAuditStart(vm, "migrated", false);
|
||||||
qemuProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_FAILED, 0);
|
qemuProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_FAILED, 0);
|
||||||
|
|
||||||
endjob:
|
endjob:
|
||||||
if (!qemuMigrationJobFinish(driver, vm)) {
|
if (!qemuMigrationJobFinish(driver, vm)) {
|
||||||
vm = NULL;
|
vm = NULL;
|
||||||
}
|
}
|
||||||
@ -2743,7 +2743,7 @@ qemuMigrationPrepareDirect(virQEMUDriverPtr driver,
|
|||||||
ret = qemuMigrationPrepareAny(driver, dconn, cookiein, cookieinlen,
|
ret = qemuMigrationPrepareAny(driver, dconn, cookiein, cookieinlen,
|
||||||
cookieout, cookieoutlen, def, origname,
|
cookieout, cookieoutlen, def, origname,
|
||||||
NULL, port, autoPort, listenAddress, flags);
|
NULL, port, autoPort, listenAddress, flags);
|
||||||
cleanup:
|
cleanup:
|
||||||
virURIFree(uri);
|
virURIFree(uri);
|
||||||
VIR_FREE(hostname);
|
VIR_FREE(hostname);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
@ -2787,7 +2787,7 @@ qemuMigrationPrepareDef(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(caps);
|
virObjectUnref(caps);
|
||||||
if (def && origname)
|
if (def && origname)
|
||||||
*origname = name;
|
*origname = name;
|
||||||
@ -2861,11 +2861,11 @@ qemuMigrationConfirmPhase(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
qemuMigrationCookieFree(mig);
|
qemuMigrationCookieFree(mig);
|
||||||
rv = 0;
|
rv = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (event)
|
if (event)
|
||||||
qemuDomainEventQueue(driver, event);
|
qemuDomainEventQueue(driver, event);
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
@ -2913,7 +2913,7 @@ qemuMigrationConfirm(virConnectPtr conn,
|
|||||||
vm = NULL;
|
vm = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (vm)
|
if (vm)
|
||||||
virObjectUnlock(vm);
|
virObjectUnlock(vm);
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
@ -3058,7 +3058,7 @@ static void qemuMigrationIOFunc(void *arg)
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
abrt:
|
abrt:
|
||||||
err = virSaveLastError();
|
err = virSaveLastError();
|
||||||
if (err && err->code == VIR_ERR_OK) {
|
if (err && err->code == VIR_ERR_OK) {
|
||||||
virFreeError(err);
|
virFreeError(err);
|
||||||
@ -3070,7 +3070,7 @@ abrt:
|
|||||||
virFreeError(err);
|
virFreeError(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virCopyLastError(&data->err);
|
virCopyLastError(&data->err);
|
||||||
virResetLastError();
|
virResetLastError();
|
||||||
VIR_FREE(buffer);
|
VIR_FREE(buffer);
|
||||||
@ -3108,7 +3108,7 @@ qemuMigrationStartTunnel(virStreamPtr st,
|
|||||||
|
|
||||||
return io;
|
return io;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FORCE_CLOSE(wakeupFD[0]);
|
VIR_FORCE_CLOSE(wakeupFD[0]);
|
||||||
VIR_FORCE_CLOSE(wakeupFD[1]);
|
VIR_FORCE_CLOSE(wakeupFD[1]);
|
||||||
VIR_FREE(io);
|
VIR_FREE(io);
|
||||||
@ -3142,7 +3142,7 @@ qemuMigrationStopTunnel(qemuMigrationIOThreadPtr io, bool error)
|
|||||||
|
|
||||||
rv = 0;
|
rv = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FORCE_CLOSE(io->wakeupSendFD);
|
VIR_FORCE_CLOSE(io->wakeupSendFD);
|
||||||
VIR_FORCE_CLOSE(io->wakeupRecvFD);
|
VIR_FORCE_CLOSE(io->wakeupRecvFD);
|
||||||
VIR_FREE(io);
|
VIR_FREE(io);
|
||||||
@ -3185,7 +3185,7 @@ qemuMigrationConnect(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(port);
|
VIR_FREE(port);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
VIR_FORCE_CLOSE(spec->dest.fd.qemu);
|
VIR_FORCE_CLOSE(spec->dest.fd.qemu);
|
||||||
@ -3391,7 +3391,7 @@ qemuMigrationRun(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0 && !orig_err)
|
if (ret < 0 && !orig_err)
|
||||||
orig_err = virSaveLastError();
|
orig_err = virSaveLastError();
|
||||||
|
|
||||||
@ -3422,7 +3422,7 @@ cleanup:
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
cancel:
|
cancel:
|
||||||
orig_err = virSaveLastError();
|
orig_err = virSaveLastError();
|
||||||
|
|
||||||
if (virDomainObjIsActive(vm)) {
|
if (virDomainObjIsActive(vm)) {
|
||||||
@ -3574,7 +3574,7 @@ static int doTunnelMigrate(virQEMUDriverPtr driver,
|
|||||||
cookieoutlen, flags, resource, &spec, dconn,
|
cookieoutlen, flags, resource, &spec, dconn,
|
||||||
graphicsuri);
|
graphicsuri);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (spec.destType == MIGRATION_DEST_FD) {
|
if (spec.destType == MIGRATION_DEST_FD) {
|
||||||
VIR_FORCE_CLOSE(spec.dest.fd.qemu);
|
VIR_FORCE_CLOSE(spec.dest.fd.qemu);
|
||||||
VIR_FORCE_CLOSE(spec.dest.fd.local);
|
VIR_FORCE_CLOSE(spec.dest.fd.local);
|
||||||
@ -3698,7 +3698,7 @@ static int doPeer2PeerMigrate2(virQEMUDriverPtr driver,
|
|||||||
*/
|
*/
|
||||||
cancelled = ret < 0;
|
cancelled = ret < 0;
|
||||||
|
|
||||||
finish:
|
finish:
|
||||||
/* In version 2 of the migration protocol, we pass the
|
/* In version 2 of the migration protocol, we pass the
|
||||||
* status code from the sender to the destination host,
|
* status code from the sender to the destination host,
|
||||||
* so it can do any cleanup if the migration failed.
|
* so it can do any cleanup if the migration failed.
|
||||||
@ -3713,7 +3713,7 @@ finish:
|
|||||||
if (cancelled && ddomain)
|
if (cancelled && ddomain)
|
||||||
VIR_ERROR(_("finish step ignored that migration was cancelled"));
|
VIR_ERROR(_("finish step ignored that migration was cancelled"));
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ddomain) {
|
if (ddomain) {
|
||||||
virObjectUnref(ddomain);
|
virObjectUnref(ddomain);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
@ -3922,7 +3922,7 @@ doPeer2PeerMigrate3(virQEMUDriverPtr driver,
|
|||||||
*/
|
*/
|
||||||
cancelled = ret < 0;
|
cancelled = ret < 0;
|
||||||
|
|
||||||
finish:
|
finish:
|
||||||
/*
|
/*
|
||||||
* The status code from the source is passed to the destination.
|
* The status code from the source is passed to the destination.
|
||||||
* The dest can cleanup in the source indicated it failed to
|
* The dest can cleanup in the source indicated it failed to
|
||||||
@ -4128,7 +4128,7 @@ static int doPeer2PeerMigrate(virQEMUDriverPtr driver,
|
|||||||
dconnuri, flags, dname, resource);
|
dconnuri, flags, dname, resource);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
orig_err = virSaveLastError();
|
orig_err = virSaveLastError();
|
||||||
qemuDomainObjEnterRemote(vm);
|
qemuDomainObjEnterRemote(vm);
|
||||||
virObjectUnref(dconn);
|
virObjectUnref(dconn);
|
||||||
@ -4214,7 +4214,7 @@ qemuMigrationPerformJob(virQEMUDriverPtr driver,
|
|||||||
VIR_DOMAIN_EVENT_STOPPED_MIGRATED);
|
VIR_DOMAIN_EVENT_STOPPED_MIGRATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
endjob:
|
endjob:
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
orig_err = virSaveLastError();
|
orig_err = virSaveLastError();
|
||||||
|
|
||||||
@ -4240,7 +4240,7 @@ endjob:
|
|||||||
virFreeError(orig_err);
|
virFreeError(orig_err);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (vm)
|
if (vm)
|
||||||
virObjectUnlock(vm);
|
virObjectUnlock(vm);
|
||||||
if (event)
|
if (event)
|
||||||
@ -4300,7 +4300,7 @@ qemuMigrationPerformPhase(virQEMUDriverPtr driver,
|
|||||||
qemuMigrationCleanup) < 0)
|
qemuMigrationCleanup) < 0)
|
||||||
goto endjob;
|
goto endjob;
|
||||||
|
|
||||||
endjob:
|
endjob:
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
hasrefs = qemuMigrationJobFinish(driver, vm);
|
hasrefs = qemuMigrationJobFinish(driver, vm);
|
||||||
else
|
else
|
||||||
@ -4312,7 +4312,7 @@ endjob:
|
|||||||
vm = NULL;
|
vm = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (vm)
|
if (vm)
|
||||||
virObjectUnlock(vm);
|
virObjectUnlock(vm);
|
||||||
if (event)
|
if (event)
|
||||||
@ -4418,7 +4418,7 @@ qemuMigrationVPAssociatePortProfiles(virDomainDefPtr def)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_exit:
|
err_exit:
|
||||||
for (i = 0; last_good_net != -1 && i < last_good_net; i++) {
|
for (i = 0; last_good_net != -1 && i < last_good_net; i++) {
|
||||||
net = def->nets[i];
|
net = def->nets[i];
|
||||||
if (virDomainNetGetActualType(net) == VIR_DOMAIN_NET_TYPE_DIRECT) {
|
if (virDomainNetGetActualType(net) == VIR_DOMAIN_NET_TYPE_DIRECT) {
|
||||||
@ -4634,7 +4634,7 @@ qemuMigrationFinish(virQEMUDriverPtr driver,
|
|||||||
if (qemuMigrationBakeCookie(mig, driver, vm, cookieout, cookieoutlen, 0) < 0)
|
if (qemuMigrationBakeCookie(mig, driver, vm, cookieout, cookieoutlen, 0) < 0)
|
||||||
VIR_WARN("Unable to encode migration cookie");
|
VIR_WARN("Unable to encode migration cookie");
|
||||||
|
|
||||||
endjob:
|
endjob:
|
||||||
if (qemuMigrationJobFinish(driver, vm) == 0) {
|
if (qemuMigrationJobFinish(driver, vm) == 0) {
|
||||||
vm = NULL;
|
vm = NULL;
|
||||||
} else if (!vm->persistent && !virDomainObjIsActive(vm)) {
|
} else if (!vm->persistent && !virDomainObjIsActive(vm)) {
|
||||||
@ -4642,7 +4642,7 @@ endjob:
|
|||||||
vm = NULL;
|
vm = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virPortAllocatorRelease(driver->migrationPorts, port);
|
virPortAllocatorRelease(driver->migrationPorts, port);
|
||||||
if (vm) {
|
if (vm) {
|
||||||
VIR_FREE(priv->origname);
|
VIR_FREE(priv->origname);
|
||||||
@ -4787,7 +4787,7 @@ qemuMigrationToFile(virQEMUDriverPtr driver, virDomainObjPtr vm,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
/* Restore max migration bandwidth */
|
/* Restore max migration bandwidth */
|
||||||
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) == 0) {
|
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) == 0) {
|
||||||
qemuMonitorSetMigrationSpeed(priv->mon, saveMigBandwidth);
|
qemuMonitorSetMigrationSpeed(priv->mon, saveMigBandwidth);
|
||||||
|
@ -319,7 +319,7 @@ qemuMonitorOpenUnix(const char *monitor, pid_t cpid)
|
|||||||
|
|
||||||
return monfd;
|
return monfd;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FORCE_CLOSE(monfd);
|
VIR_FORCE_CLOSE(monfd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -357,12 +357,12 @@ qemuMonitorGetErrorFromLog(qemuMonitorPtr mon)
|
|||||||
if ((len = qemuProcessReadLog(mon->logfd, logbuf, 4096 - 1, 0, true)) <= 0)
|
if ((len = qemuProcessReadLog(mon->logfd, logbuf, 4096 - 1, 0, true)) <= 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
errno = orig_errno;
|
errno = orig_errno;
|
||||||
VIR_FORCE_CLOSE(mon->logfd);
|
VIR_FORCE_CLOSE(mon->logfd);
|
||||||
return logbuf;
|
return logbuf;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(logbuf);
|
VIR_FREE(logbuf);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -830,7 +830,7 @@ qemuMonitorOpenInternal(virDomainObjPtr vm,
|
|||||||
|
|
||||||
return mon;
|
return mon;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
/* We don't want the 'destroy' callback invoked during
|
/* We don't want the 'destroy' callback invoked during
|
||||||
* cleanup from construction failure, because that can
|
* cleanup from construction failure, because that can
|
||||||
* give a double-unref on virDomainObjPtr in the caller,
|
* give a double-unref on virDomainObjPtr in the caller,
|
||||||
@ -985,7 +985,7 @@ int qemuMonitorSend(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
mon->msg = NULL;
|
mon->msg = NULL;
|
||||||
qemuMonitorUpdateWatch(mon);
|
qemuMonitorUpdateWatch(mon);
|
||||||
|
|
||||||
@ -1108,7 +1108,7 @@ qemuMonitorFindBalloonObjectPath(qemuMonitorPtr mon,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
for (i = 0; i < npaths; i++)
|
for (i = 0; i < npaths; i++)
|
||||||
qemuMonitorJSONListPathFree(paths[i]);
|
qemuMonitorJSONListPathFree(paths[i]);
|
||||||
VIR_FREE(paths);
|
VIR_FREE(paths);
|
||||||
@ -1141,7 +1141,7 @@ int qemuMonitorHMPCommandWithFd(qemuMonitorPtr mon,
|
|||||||
ret = qemuMonitorTextCommandWithFd(mon, cmd, scm_fd, reply);
|
ret = qemuMonitorTextCommandWithFd(mon, cmd, scm_fd, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(json_cmd);
|
VIR_FREE(json_cmd);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1403,7 +1403,7 @@ int qemuMonitorSetCapabilities(qemuMonitorPtr mon)
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2251,7 +2251,7 @@ int qemuMonitorMigrateToCommand(qemuMonitorPtr mon,
|
|||||||
else
|
else
|
||||||
ret = qemuMonitorTextMigrate(mon, flags, dest);
|
ret = qemuMonitorTextMigrate(mon, flags, dest);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(argstr);
|
VIR_FREE(argstr);
|
||||||
VIR_FREE(dest);
|
VIR_FREE(dest);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2316,7 +2316,7 @@ int qemuMonitorMigrateToFile(qemuMonitorPtr mon,
|
|||||||
else
|
else
|
||||||
ret = qemuMonitorTextMigrate(mon, flags, dest);
|
ret = qemuMonitorTextMigrate(mon, flags, dest);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(safe_target);
|
VIR_FREE(safe_target);
|
||||||
VIR_FREE(argstr);
|
VIR_FREE(argstr);
|
||||||
VIR_FREE(dest);
|
VIR_FREE(dest);
|
||||||
@ -2661,7 +2661,7 @@ int qemuMonitorCloseFileHandle(qemuMonitorPtr mon,
|
|||||||
else
|
else
|
||||||
ret = qemuMonitorTextCloseFileHandle(mon, fdname);
|
ret = qemuMonitorTextCloseFileHandle(mon, fdname);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (error) {
|
if (error) {
|
||||||
virSetError(error);
|
virSetError(error);
|
||||||
virFreeError(error);
|
virFreeError(error);
|
||||||
@ -2733,7 +2733,7 @@ qemuMonitorRemoveFd(qemuMonitorPtr mon, int fdset, int fd)
|
|||||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||||
_("remove fd requires JSON monitor"));
|
_("remove fd requires JSON monitor"));
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (error) {
|
if (error) {
|
||||||
virSetError(error);
|
virSetError(error);
|
||||||
virFreeError(error);
|
virFreeError(error);
|
||||||
@ -2776,7 +2776,7 @@ int qemuMonitorAddHostNetwork(qemuMonitorPtr mon,
|
|||||||
else
|
else
|
||||||
ret = qemuMonitorTextAddHostNetwork(mon, netstr);
|
ret = qemuMonitorTextAddHostNetwork(mon, netstr);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
while (i--) {
|
while (i--) {
|
||||||
if (qemuMonitorCloseFileHandle(mon, tapfdName[i]) < 0)
|
if (qemuMonitorCloseFileHandle(mon, tapfdName[i]) < 0)
|
||||||
@ -2848,7 +2848,7 @@ int qemuMonitorAddNetdev(qemuMonitorPtr mon,
|
|||||||
else
|
else
|
||||||
ret = qemuMonitorTextAddNetdev(mon, netdevstr);
|
ret = qemuMonitorTextAddNetdev(mon, netdevstr);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
while (i--) {
|
while (i--) {
|
||||||
if (qemuMonitorCloseFileHandle(mon, tapfdName[i]) < 0)
|
if (qemuMonitorCloseFileHandle(mon, tapfdName[i]) < 0)
|
||||||
|
@ -211,7 +211,7 @@ qemuMonitorJSONIOProcessLine(qemuMonitorPtr mon,
|
|||||||
_("Unknown JSON reply '%s'"), line);
|
_("Unknown JSON reply '%s'"), line);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(obj);
|
virJSONValueFree(obj);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -301,7 +301,7 @@ qemuMonitorJSONCommandWithFd(qemuMonitorPtr mon,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(id);
|
VIR_FREE(id);
|
||||||
VIR_FREE(cmdstr);
|
VIR_FREE(cmdstr);
|
||||||
VIR_FREE(msg.txBuffer);
|
VIR_FREE(msg.txBuffer);
|
||||||
@ -524,7 +524,7 @@ qemuMonitorJSONMakeCommandRaw(bool wrap, const char *cmdname, ...)
|
|||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virJSONValueFree(obj);
|
virJSONValueFree(obj);
|
||||||
virJSONValueFree(jargs);
|
virJSONValueFree(jargs);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
@ -582,7 +582,7 @@ qemuMonitorJSONKeywordStringToJSON(const char *str, const char *firstkeyword)
|
|||||||
qemuFreeKeywords(nkeywords, keywords, values);
|
qemuFreeKeywords(nkeywords, keywords, values);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
qemuFreeKeywords(nkeywords, keywords, values);
|
qemuFreeKeywords(nkeywords, keywords, values);
|
||||||
virJSONValueFree(ret);
|
virJSONValueFree(ret);
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -857,7 +857,7 @@ qemuMonitorJSONHandleBlockJobImpl(qemuMonitorPtr mon,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
qemuMonitorEmitBlockJob(mon, device, type, event);
|
qemuMonitorEmitBlockJob(mon, device, type, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1002,7 +1002,7 @@ qemuMonitorJSONHumanCommandWithFd(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1135,7 +1135,7 @@ qemuMonitorJSONGetStatus(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1261,7 +1261,7 @@ qemuMonitorJSONExtractCPUInfo(virJSONValuePtr reply,
|
|||||||
threads = NULL;
|
threads = NULL;
|
||||||
ret = ncpus;
|
ret = ncpus;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(threads);
|
VIR_FREE(threads);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1333,7 +1333,7 @@ int qemuMonitorJSONGetVirtType(qemuMonitorPtr mon,
|
|||||||
*virtType = VIR_DOMAIN_VIRT_KVM;
|
*virtType = VIR_DOMAIN_VIRT_KVM;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1392,7 +1392,7 @@ int qemuMonitorJSONGetBalloonInfo(qemuMonitorPtr mon,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1498,7 +1498,7 @@ int qemuMonitorJSONGetMemoryStats(qemuMonitorPtr mon,
|
|||||||
VIR_DOMAIN_MEMORY_STAT_AVAILABLE, 1024);
|
VIR_DOMAIN_MEMORY_STAT_AVAILABLE, 1024);
|
||||||
|
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
|
|
||||||
@ -1622,7 +1622,7 @@ int qemuMonitorJSONGetBlockInfo(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1782,7 +1782,7 @@ int qemuMonitorJSONGetBlockStatsInfo(qemuMonitorPtr mon,
|
|||||||
}
|
}
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1856,7 +1856,7 @@ int qemuMonitorJSONGetBlockStatsParamsNumber(qemuMonitorPtr mon,
|
|||||||
*nparams = num;
|
*nparams = num;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1951,7 +1951,7 @@ int qemuMonitorJSONGetBlockExtent(qemuMonitorPtr mon,
|
|||||||
}
|
}
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1985,7 +1985,7 @@ int qemuMonitorJSONBlockResize(qemuMonitorPtr mon,
|
|||||||
ret = qemuMonitorJSONCheckError(cmd, reply);
|
ret = qemuMonitorJSONCheckError(cmd, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2041,7 +2041,7 @@ int qemuMonitorJSONSetPassword(qemuMonitorPtr mon,
|
|||||||
ret = qemuMonitorJSONCheckError(cmd, reply);
|
ret = qemuMonitorJSONCheckError(cmd, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2072,7 +2072,7 @@ int qemuMonitorJSONExpirePassword(qemuMonitorPtr mon,
|
|||||||
ret = qemuMonitorJSONCheckError(cmd, reply);
|
ret = qemuMonitorJSONCheckError(cmd, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2109,7 +2109,7 @@ int qemuMonitorJSONSetBalloon(qemuMonitorPtr mon,
|
|||||||
ret = 1;
|
ret = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2150,12 +2150,12 @@ int qemuMonitorJSONSetCPU(qemuMonitorPtr mon,
|
|||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
fallback:
|
fallback:
|
||||||
VIR_DEBUG("no QMP support for cpu_set, trying HMP");
|
VIR_DEBUG("no QMP support for cpu_set, trying HMP");
|
||||||
ret = qemuMonitorTextSetCPU(mon, cpu, online);
|
ret = qemuMonitorTextSetCPU(mon, cpu, online);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -2342,7 +2342,7 @@ qemuMonitorJSONGetMigrationCacheSize(qemuMonitorPtr mon,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2716,7 +2716,7 @@ qemuMonitorJSONGetDumpGuestMemoryCapability(qemuMonitorPtr mon,
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2944,12 +2944,12 @@ qemuMonitorJSONAddFd(qemuMonitorPtr mon, int fdset, int fd, const char *name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
/* Best effort cleanup - kill the entire fdset (even if it has
|
/* Best effort cleanup - kill the entire fdset (even if it has
|
||||||
* earlier successful fd registrations), since we don't know which
|
* earlier successful fd registrations), since we don't know which
|
||||||
* fd qemu got, and don't want to leave the fd leaked in qemu. */
|
* fd qemu got, and don't want to leave the fd leaked in qemu. */
|
||||||
@ -3007,7 +3007,7 @@ int qemuMonitorJSONAddNetdev(qemuMonitorPtr mon,
|
|||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
ret = qemuMonitorJSONCheckError(cmd, reply);
|
ret = qemuMonitorJSONCheckError(cmd, reply);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(args);
|
virJSONValueFree(args);
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
@ -3104,7 +3104,7 @@ static int qemuMonitorJSONExtractPtyPaths(virJSONValuePtr reply,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3202,7 +3202,7 @@ int qemuMonitorJSONAddDevice(qemuMonitorPtr mon,
|
|||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
ret = qemuMonitorJSONCheckError(cmd, reply);
|
ret = qemuMonitorJSONCheckError(cmd, reply);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(args);
|
virJSONValueFree(args);
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
@ -3322,7 +3322,7 @@ qemuMonitorJSONDiskSnapshot(qemuMonitorPtr mon, virJSONValuePtr actions,
|
|||||||
ret = qemuMonitorJSONCheckError(cmd, reply);
|
ret = qemuMonitorJSONCheckError(cmd, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -3357,7 +3357,7 @@ qemuMonitorJSONDriveMirror(qemuMonitorPtr mon,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
ret = qemuMonitorJSONCheckError(cmd, reply);
|
ret = qemuMonitorJSONCheckError(cmd, reply);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -3384,7 +3384,7 @@ qemuMonitorJSONTransaction(qemuMonitorPtr mon, virJSONValuePtr actions)
|
|||||||
|
|
||||||
ret = qemuMonitorJSONCheckError(cmd, reply);
|
ret = qemuMonitorJSONCheckError(cmd, reply);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
actions->protect = protect;
|
actions->protect = protect;
|
||||||
@ -3414,7 +3414,7 @@ qemuMonitorJSONBlockCommit(qemuMonitorPtr mon, const char *device,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
ret = qemuMonitorJSONCheckError(cmd, reply);
|
ret = qemuMonitorJSONCheckError(cmd, reply);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -3439,7 +3439,7 @@ qemuMonitorJSONDrivePivot(qemuMonitorPtr mon, const char *device,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
ret = qemuMonitorJSONCheckError(cmd, reply);
|
ret = qemuMonitorJSONCheckError(cmd, reply);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -3470,7 +3470,7 @@ int qemuMonitorJSONArbitraryCommand(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
|
|
||||||
@ -3497,7 +3497,7 @@ int qemuMonitorJSONInjectNMI(qemuMonitorPtr mon)
|
|||||||
ret = qemuMonitorJSONCheckError(cmd, reply);
|
ret = qemuMonitorJSONCheckError(cmd, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -3565,7 +3565,7 @@ int qemuMonitorJSONSendKey(qemuMonitorPtr mon,
|
|||||||
ret = qemuMonitorJSONCheckError(cmd, reply);
|
ret = qemuMonitorJSONCheckError(cmd, reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
virJSONValueFree(keys);
|
virJSONValueFree(keys);
|
||||||
@ -3898,7 +3898,7 @@ qemuMonitorJSONBlockIoThrottleInfo(virJSONValuePtr result,
|
|||||||
}
|
}
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#undef GET_THROTTLE_STATS
|
#undef GET_THROTTLE_STATS
|
||||||
@ -4070,7 +4070,7 @@ int qemuMonitorJSONGetVersion(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -4165,7 +4165,7 @@ int qemuMonitorJSONGetMachines(qemuMonitorPtr mon,
|
|||||||
ret = n;
|
ret = n;
|
||||||
*machines = infolist;
|
*machines = infolist;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0 && infolist) {
|
if (ret < 0 && infolist) {
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
qemuMonitorMachineInfoFree(infolist[i]);
|
qemuMonitorMachineInfoFree(infolist[i]);
|
||||||
@ -4248,7 +4248,7 @@ int qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon,
|
|||||||
ret = n;
|
ret = n;
|
||||||
*cpus = cpulist;
|
*cpus = cpulist;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
virStringFreeList(cpulist);
|
virStringFreeList(cpulist);
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
@ -4316,7 +4316,7 @@ int qemuMonitorJSONGetCommands(qemuMonitorPtr mon,
|
|||||||
ret = n;
|
ret = n;
|
||||||
*commands = commandlist;
|
*commands = commandlist;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
virStringFreeList(commandlist);
|
virStringFreeList(commandlist);
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
@ -4389,7 +4389,7 @@ int qemuMonitorJSONGetEvents(qemuMonitorPtr mon,
|
|||||||
ret = n;
|
ret = n;
|
||||||
*events = eventlist;
|
*events = eventlist;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
virStringFreeList(eventlist);
|
virStringFreeList(eventlist);
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
@ -4502,7 +4502,7 @@ qemuMonitorJSONGetCommandLineOptionParameters(qemuMonitorPtr mon,
|
|||||||
ret = n;
|
ret = n;
|
||||||
*params = paramlist;
|
*params = paramlist;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
/* If we failed before getting the JSON array of options, we (try)
|
/* If we failed before getting the JSON array of options, we (try)
|
||||||
* to cache an empty array to speed up the next failure. */
|
* to cache an empty array to speed up the next failure. */
|
||||||
if (!qemuMonitorGetOptions(mon))
|
if (!qemuMonitorGetOptions(mon))
|
||||||
@ -4560,7 +4560,7 @@ int qemuMonitorJSONGetKVMState(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -4626,7 +4626,7 @@ int qemuMonitorJSONGetObjectTypes(qemuMonitorPtr mon,
|
|||||||
ret = n;
|
ret = n;
|
||||||
*types = typelist;
|
*types = typelist;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
virStringFreeList(typelist);
|
virStringFreeList(typelist);
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
@ -4713,7 +4713,7 @@ int qemuMonitorJSONGetObjectListPaths(qemuMonitorPtr mon,
|
|||||||
ret = n;
|
ret = n;
|
||||||
*paths = pathlist;
|
*paths = pathlist;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0 && pathlist) {
|
if (ret < 0 && pathlist) {
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
qemuMonitorJSONListPathFree(pathlist[i]);
|
qemuMonitorJSONListPathFree(pathlist[i]);
|
||||||
@ -4811,7 +4811,7 @@ int qemuMonitorJSONGetObjectProperty(qemuMonitorPtr mon,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
|
|
||||||
@ -4872,7 +4872,7 @@ int qemuMonitorJSONSetObjectProperty(qemuMonitorPtr mon,
|
|||||||
if ((ret = qemuMonitorJSONCommand(mon, cmd, &reply)) == 0)
|
if ((ret = qemuMonitorJSONCommand(mon, cmd, &reply)) == 0)
|
||||||
ret = qemuMonitorJSONCheckError(cmd, reply);
|
ret = qemuMonitorJSONCheckError(cmd, reply);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
|
|
||||||
@ -4948,7 +4948,7 @@ int qemuMonitorJSONGetObjectProps(qemuMonitorPtr mon,
|
|||||||
ret = n;
|
ret = n;
|
||||||
*props = proplist;
|
*props = proplist;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
virStringFreeList(proplist);
|
virStringFreeList(proplist);
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
@ -4992,7 +4992,7 @@ qemuMonitorJSONGetTargetArch(qemuMonitorPtr mon)
|
|||||||
|
|
||||||
ignore_value(VIR_STRDUP(ret, arch));
|
ignore_value(VIR_STRDUP(ret, arch));
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -5057,7 +5057,7 @@ qemuMonitorJSONGetMigrationCapability(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -5107,7 +5107,7 @@ qemuMonitorJSONSetMigrationCapability(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = qemuMonitorJSONCheckError(cmd, reply);
|
ret = qemuMonitorJSONCheckError(cmd, reply);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(caps);
|
virJSONValueFree(caps);
|
||||||
virJSONValueFree(cap);
|
virJSONValueFree(cap);
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
@ -5134,7 +5134,7 @@ qemuMonitorJSONBuildInetSocketAddress(const char *host,
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
return addr;
|
return addr;
|
||||||
error:
|
error:
|
||||||
virJSONValueFree(data);
|
virJSONValueFree(data);
|
||||||
virJSONValueFree(addr);
|
virJSONValueFree(addr);
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -5156,7 +5156,7 @@ qemuMonitorJSONBuildUnixSocketAddress(const char *path)
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
return addr;
|
return addr;
|
||||||
error:
|
error:
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
virJSONValueFree(data);
|
virJSONValueFree(data);
|
||||||
virJSONValueFree(addr);
|
virJSONValueFree(addr);
|
||||||
@ -5196,7 +5196,7 @@ qemuMonitorJSONNBDServerStart(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(port_str);
|
VIR_FREE(port_str);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
@ -5318,7 +5318,7 @@ qemuMonitorJSONGetStringArray(qemuMonitorPtr mon, const char *qmpCmd,
|
|||||||
ret = n;
|
ret = n;
|
||||||
*array = list;
|
*array = list;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
virStringFreeList(list);
|
virStringFreeList(list);
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
@ -5443,9 +5443,9 @@ qemuMonitorJSONAttachCharDevCommand(const char *chrID,
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
no_memory:
|
no_memory:
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
error:
|
error:
|
||||||
virJSONValueFree(addr);
|
virJSONValueFree(addr);
|
||||||
virJSONValueFree(data);
|
virJSONValueFree(data);
|
||||||
virJSONValueFree(backend);
|
virJSONValueFree(backend);
|
||||||
@ -5493,7 +5493,7 @@ qemuMonitorJSONAttachCharDev(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -5553,7 +5553,7 @@ qemuMonitorJSONGetDeviceAliases(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
qemuMonitorJSONListPathFree(paths[i]);
|
qemuMonitorJSONListPathFree(paths[i]);
|
||||||
VIR_FREE(paths);
|
VIR_FREE(paths);
|
||||||
@ -5708,7 +5708,7 @@ qemuMonitorJSONGetCPUx86Data(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virJSONValueFree(cmd);
|
virJSONValueFree(cmd);
|
||||||
virJSONValueFree(reply);
|
virJSONValueFree(reply);
|
||||||
virCPUx86DataFree(x86Data);
|
virCPUx86DataFree(x86Data);
|
||||||
|
@ -430,7 +430,7 @@ qemuMonitorTextGetStatus(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -486,7 +486,7 @@ qemuMonitorTextSetLink(qemuMonitorPtr mon,
|
|||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(info);
|
VIR_FREE(info);
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
|
|
||||||
@ -556,7 +556,7 @@ int qemuMonitorTextGetCPUInfo(qemuMonitorPtr mon,
|
|||||||
*pids = cpupids;
|
*pids = cpupids;
|
||||||
return ncpupids;
|
return ncpupids;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(qemucpus);
|
VIR_FREE(qemucpus);
|
||||||
VIR_FREE(cpupids);
|
VIR_FREE(cpupids);
|
||||||
|
|
||||||
@ -707,7 +707,7 @@ int qemuMonitorTextGetBalloonInfo(qemuMonitorPtr mon,
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -834,7 +834,7 @@ int qemuMonitorTextGetBlockInfo(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(info);
|
VIR_FREE(info);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1071,7 +1071,7 @@ int qemuMonitorTextBlockResize(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1145,7 +1145,7 @@ int qemuMonitorTextSetPassword(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1174,7 +1174,7 @@ int qemuMonitorTextExpirePassword(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1276,7 +1276,7 @@ int qemuMonitorTextEjectMedia(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1320,7 +1320,7 @@ int qemuMonitorTextChangeMedia(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(safepath);
|
VIR_FREE(safepath);
|
||||||
@ -1351,7 +1351,7 @@ static int qemuMonitorTextSaveMemory(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
VIR_FREE(safepath);
|
VIR_FREE(safepath);
|
||||||
@ -1391,7 +1391,7 @@ int qemuMonitorTextSetMigrationSpeed(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(info);
|
VIR_FREE(info);
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1413,7 +1413,7 @@ int qemuMonitorTextSetMigrationDowntime(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(info);
|
VIR_FREE(info);
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1545,10 +1545,10 @@ int qemuMonitorTextGetMigrationStatus(qemuMonitorPtr mon,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
memset(status, 0, sizeof(*status));
|
memset(status, 0, sizeof(*status));
|
||||||
@ -1607,7 +1607,7 @@ int qemuMonitorTextMigrate(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(extrastr);
|
VIR_FREE(extrastr);
|
||||||
VIR_FREE(safedest);
|
VIR_FREE(safedest);
|
||||||
VIR_FREE(info);
|
VIR_FREE(info);
|
||||||
@ -1681,7 +1681,7 @@ int qemuMonitorTextAddUSBDisk(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(safepath);
|
VIR_FREE(safepath);
|
||||||
VIR_FREE(info);
|
VIR_FREE(info);
|
||||||
@ -1712,7 +1712,7 @@ static int qemuMonitorTextAddUSBDevice(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1848,7 +1848,7 @@ int qemuMonitorTextAddPCIHostDevice(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1870,7 +1870,7 @@ int qemuMonitorTextAddPCIDisk(qemuMonitorPtr mon,
|
|||||||
if (!safe_path)
|
if (!safe_path)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
try_command:
|
try_command:
|
||||||
if (virAsprintf(&cmd, "pci_add %s storage file=%s,if=%s",
|
if (virAsprintf(&cmd, "pci_add %s storage file=%s,if=%s",
|
||||||
(tryOldSyntax ? "0": "pci_addr=auto"), safe_path, bus) < 0)
|
(tryOldSyntax ? "0": "pci_addr=auto"), safe_path, bus) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -1893,7 +1893,7 @@ try_command:
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(safe_path);
|
VIR_FREE(safe_path);
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
@ -1923,7 +1923,7 @@ int qemuMonitorTextAddPCINetwork(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
return ret;
|
return ret;
|
||||||
@ -1938,7 +1938,7 @@ int qemuMonitorTextRemovePCIDevice(qemuMonitorPtr mon,
|
|||||||
bool tryOldSyntax = false;
|
bool tryOldSyntax = false;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
try_command:
|
try_command:
|
||||||
if (tryOldSyntax) {
|
if (tryOldSyntax) {
|
||||||
if (virAsprintf(&cmd, "pci_del 0 %.2x", guestAddr->slot) < 0)
|
if (virAsprintf(&cmd, "pci_del 0 %.2x", guestAddr->slot) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -1974,7 +1974,7 @@ try_command:
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2013,7 +2013,7 @@ int qemuMonitorTextSendFileHandle(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2044,7 +2044,7 @@ int qemuMonitorTextCloseFileHandle(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2073,7 +2073,7 @@ int qemuMonitorTextAddHostNetwork(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2098,7 +2098,7 @@ int qemuMonitorTextRemoveHostNetwork(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2122,7 +2122,7 @@ int qemuMonitorTextAddNetdev(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2146,7 +2146,7 @@ int qemuMonitorTextRemoveNetdev(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2229,7 +2229,7 @@ int qemuMonitorTextGetPtyPaths(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -2244,7 +2244,7 @@ int qemuMonitorTextAttachPCIDiskController(qemuMonitorPtr mon,
|
|||||||
bool tryOldSyntax = false;
|
bool tryOldSyntax = false;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
try_command:
|
try_command:
|
||||||
if (virAsprintf(&cmd, "pci_add %s storage if=%s",
|
if (virAsprintf(&cmd, "pci_add %s storage if=%s",
|
||||||
(tryOldSyntax ? "0": "pci_addr=auto"), bus) < 0)
|
(tryOldSyntax ? "0": "pci_addr=auto"), bus) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -2267,7 +2267,7 @@ try_command:
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2334,7 +2334,7 @@ int qemuMonitorTextAttachDrive(qemuMonitorPtr mon,
|
|||||||
if (!safe_str)
|
if (!safe_str)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
try_command:
|
try_command:
|
||||||
if (virAsprintf(&cmd, "drive_add %s%.2x:%.2x:%.2x %s",
|
if (virAsprintf(&cmd, "drive_add %s%.2x:%.2x:%.2x %s",
|
||||||
(tryOldSyntax ? "" : "pci_addr="),
|
(tryOldSyntax ? "" : "pci_addr="),
|
||||||
controllerAddr->domain, controllerAddr->bus,
|
controllerAddr->domain, controllerAddr->bus,
|
||||||
@ -2364,7 +2364,7 @@ try_command:
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
VIR_FREE(safe_str);
|
VIR_FREE(safe_str);
|
||||||
@ -2487,7 +2487,7 @@ int qemuMonitorTextGetAllPCIAddresses(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
return naddrs;
|
return naddrs;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(addrs);
|
VIR_FREE(addrs);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
return -1;
|
return -1;
|
||||||
@ -2524,7 +2524,7 @@ int qemuMonitorTextDelDevice(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
VIR_FREE(safedev);
|
VIR_FREE(safedev);
|
||||||
@ -2567,7 +2567,7 @@ int qemuMonitorTextAddDevice(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
VIR_FREE(safedev);
|
VIR_FREE(safedev);
|
||||||
@ -2609,7 +2609,7 @@ int qemuMonitorTextAddDrive(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
VIR_FREE(safe_str);
|
VIR_FREE(safe_str);
|
||||||
@ -2655,7 +2655,7 @@ int qemuMonitorTextDriveDel(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
VIR_FREE(safedev);
|
VIR_FREE(safedev);
|
||||||
@ -2694,7 +2694,7 @@ int qemuMonitorTextSetDrivePassphrase(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
VIR_FREE(safe_str);
|
VIR_FREE(safe_str);
|
||||||
@ -2737,7 +2737,7 @@ int qemuMonitorTextCreateSnapshot(qemuMonitorPtr mon, const char *name)
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(safename);
|
VIR_FREE(safename);
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
@ -2790,7 +2790,7 @@ int qemuMonitorTextLoadSnapshot(qemuMonitorPtr mon, const char *name)
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(safename);
|
VIR_FREE(safename);
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
@ -2827,7 +2827,7 @@ int qemuMonitorTextDeleteSnapshot(qemuMonitorPtr mon, const char *name)
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(safename);
|
VIR_FREE(safename);
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
@ -2918,7 +2918,7 @@ int qemuMonitorTextSendKey(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2944,7 +2944,7 @@ int qemuMonitorTextScreendump(qemuMonitorPtr mon, const char *file)
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2971,7 +2971,7 @@ int qemuMonitorTextOpenGraphics(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(reply);
|
VIR_FREE(reply);
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
return ret;
|
return ret;
|
||||||
@ -3005,7 +3005,7 @@ int qemuMonitorTextSetBlockIoThrottle(qemuMonitorPtr mon,
|
|||||||
}
|
}
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(cmd);
|
VIR_FREE(cmd);
|
||||||
VIR_FREE(result);
|
VIR_FREE(result);
|
||||||
return ret;
|
return ret;
|
||||||
@ -3082,7 +3082,7 @@ qemuMonitorTextParseBlockIoThrottle(const char *result,
|
|||||||
virReportError(VIR_ERR_INVALID_ARG,
|
virReportError(VIR_ERR_INVALID_ARG,
|
||||||
_("No info for device '%s'"), device);
|
_("No info for device '%s'"), device);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3105,7 +3105,7 @@ int qemuMonitorTextGetBlockIoThrottle(qemuMonitorPtr mon,
|
|||||||
|
|
||||||
ret = qemuMonitorTextParseBlockIoThrottle(result, device, reply);
|
ret = qemuMonitorTextParseBlockIoThrottle(result, device, reply);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(result);
|
VIR_FREE(result);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ qemuProcessRemoveDomainStatus(virQEMUDriverPtr driver,
|
|||||||
vm->def->name, virStrerror(errno, ebuf, sizeof(ebuf)));
|
vm->def->name, virStrerror(errno, ebuf, sizeof(ebuf)));
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -151,7 +151,7 @@ qemuProcessHandleAgentEOF(qemuAgentPtr agent,
|
|||||||
qemuAgentClose(agent);
|
qemuAgentClose(agent);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
unlock:
|
unlock:
|
||||||
virObjectUnlock(vm);
|
virObjectUnlock(vm);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -276,7 +276,7 @@ qemuConnectAgent(virQEMUDriverPtr driver, virDomainObjPtr vm)
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -334,10 +334,10 @@ qemuProcessHandleMonitorEOF(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
unlock:
|
unlock:
|
||||||
virObjectUnlock(vm);
|
virObjectUnlock(vm);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (event)
|
if (event)
|
||||||
qemuDomainEventQueue(driver, event);
|
qemuDomainEventQueue(driver, event);
|
||||||
}
|
}
|
||||||
@ -488,7 +488,7 @@ qemuProcessGetVolumeQcowPassphrase(virConnectPtr conn,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -512,7 +512,7 @@ qemuProcessFindVolumeQcowPassphrase(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|||||||
|
|
||||||
ret = qemuProcessGetVolumeQcowPassphrase(conn, disk, secretRet, secretLen);
|
ret = qemuProcessGetVolumeQcowPassphrase(conn, disk, secretRet, secretLen);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnlock(vm);
|
virObjectUnlock(vm);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -608,11 +608,11 @@ qemuProcessFakeReboot(void *opaque)
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
endjob:
|
endjob:
|
||||||
if (!qemuDomainObjEndJob(driver, vm))
|
if (!qemuDomainObjEndJob(driver, vm))
|
||||||
vm = NULL;
|
vm = NULL;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (vm) {
|
if (vm) {
|
||||||
if (ret == -1) {
|
if (ret == -1) {
|
||||||
ignore_value(qemuProcessKill(vm, VIR_QEMU_PROCESS_KILL_FORCE));
|
ignore_value(qemuProcessKill(vm, VIR_QEMU_PROCESS_KILL_FORCE));
|
||||||
@ -722,7 +722,7 @@ qemuProcessHandleShutdown(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|||||||
|
|
||||||
qemuProcessShutdownOrReboot(driver, vm);
|
qemuProcessShutdownOrReboot(driver, vm);
|
||||||
|
|
||||||
unlock:
|
unlock:
|
||||||
virObjectUnlock(vm);
|
virObjectUnlock(vm);
|
||||||
if (event)
|
if (event)
|
||||||
qemuDomainEventQueue(driver, event);
|
qemuDomainEventQueue(driver, event);
|
||||||
@ -769,7 +769,7 @@ qemuProcessHandleStop(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unlock:
|
unlock:
|
||||||
virObjectUnlock(vm);
|
virObjectUnlock(vm);
|
||||||
if (event)
|
if (event)
|
||||||
qemuDomainEventQueue(driver, event);
|
qemuDomainEventQueue(driver, event);
|
||||||
@ -823,7 +823,7 @@ qemuProcessHandleResume(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unlock:
|
unlock:
|
||||||
virObjectUnlock(vm);
|
virObjectUnlock(vm);
|
||||||
if (event)
|
if (event)
|
||||||
qemuDomainEventQueue(driver, event);
|
qemuDomainEventQueue(driver, event);
|
||||||
@ -1109,7 +1109,7 @@ qemuProcessHandleGraphics(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (localAddr) {
|
if (localAddr) {
|
||||||
VIR_FREE(localAddr->service);
|
VIR_FREE(localAddr->service);
|
||||||
VIR_FREE(localAddr->node);
|
VIR_FREE(localAddr->node);
|
||||||
@ -1354,7 +1354,7 @@ qemuProcessHandleGuestPanic(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|||||||
VIR_FREE(processEvent);
|
VIR_FREE(processEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (vm)
|
if (vm)
|
||||||
virObjectUnlock(vm);
|
virObjectUnlock(vm);
|
||||||
|
|
||||||
@ -1387,7 +1387,7 @@ qemuProcessHandleDeviceDeleted(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|||||||
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
|
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
|
||||||
VIR_WARN("unable to save domain status with balloon change");
|
VIR_WARN("unable to save domain status with balloon change");
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnlock(vm);
|
virObjectUnlock(vm);
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return 0;
|
return 0;
|
||||||
@ -1476,7 +1476,7 @@ qemuConnectMonitor(virQEMUDriverPtr driver, virDomainObjPtr vm, int logfd)
|
|||||||
ret = virQEMUCapsProbeQMP(priv->qemuCaps, priv->mon);
|
ret = virQEMUCapsProbeQMP(priv->qemuCaps, priv->mon);
|
||||||
qemuDomainObjExitMonitor(driver, vm);
|
qemuDomainObjExitMonitor(driver, vm);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1594,7 +1594,7 @@ qemuProcessReadLogOutput(virDomainObjPtr vm,
|
|||||||
_("Timed out while reading %s log output: %s"),
|
_("Timed out while reading %s log output: %s"),
|
||||||
what, buf);
|
what, buf);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1657,7 +1657,7 @@ qemuProcessReadChildErrors(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FORCE_CLOSE(logfd);
|
VIR_FORCE_CLOSE(logfd);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1924,7 +1924,7 @@ qemuProcessWaitForMonitor(virQEMUDriverPtr driver,
|
|||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
ret = qemuProcessFindCharDevicePTYsMonitor(vm, qemuCaps, paths);
|
ret = qemuProcessFindCharDevicePTYsMonitor(vm, qemuCaps, paths);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virHashFree(paths);
|
virHashFree(paths);
|
||||||
|
|
||||||
if (pos != -1 && kill(vm->pid, 0) == -1 && errno == ESRCH) {
|
if (pos != -1 && kill(vm->pid, 0) == -1 && errno == ESRCH) {
|
||||||
@ -1948,7 +1948,7 @@ cleanup:
|
|||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
closelog:
|
closelog:
|
||||||
if (VIR_CLOSE(logfd) < 0) {
|
if (VIR_CLOSE(logfd) < 0) {
|
||||||
char ebuf[1024];
|
char ebuf[1024];
|
||||||
VIR_WARN("Unable to close logfile: %s",
|
VIR_WARN("Unable to close logfile: %s",
|
||||||
@ -2049,7 +2049,7 @@ qemuPrepareCpumap(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(caps);
|
virObjectUnref(caps);
|
||||||
return cpumap;
|
return cpumap;
|
||||||
}
|
}
|
||||||
@ -2097,7 +2097,7 @@ qemuProcessInitCpuAffinity(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virBitmapFree(cpumap);
|
virBitmapFree(cpumap);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -2164,7 +2164,7 @@ qemuProcessSetVcpuAffinities(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2241,7 +2241,7 @@ qemuProcessInitPasswords(virConnectPtr conn,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -2706,7 +2706,7 @@ static int qemuProcessHook(void *data)
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(h->cfg);
|
virObjectUnref(h->cfg);
|
||||||
VIR_DEBUG("Hook complete ret=%d", ret);
|
VIR_DEBUG("Hook complete ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
@ -2765,7 +2765,7 @@ qemuProcessStartCPUs(virQEMUDriverPtr driver, virDomainObjPtr vm,
|
|||||||
VIR_DEBUG("Preserving lock state '%s'", NULLSTR(priv->lockState));
|
VIR_DEBUG("Preserving lock state '%s'", NULLSTR(priv->lockState));
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(cfg);
|
virObjectUnref(cfg);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -3123,7 +3123,7 @@ qemuProcessUpdateDevices(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virStringFreeList(old);
|
virStringFreeList(old);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -3295,7 +3295,7 @@ qemuProcessReconnect(void *opaque)
|
|||||||
if (virAtomicIntInc(&driver->nactive) == 1 && driver->inhibitCallback)
|
if (virAtomicIntInc(&driver->nactive) == 1 && driver->inhibitCallback)
|
||||||
driver->inhibitCallback(true, driver->inhibitOpaque);
|
driver->inhibitCallback(true, driver->inhibitOpaque);
|
||||||
|
|
||||||
endjob:
|
endjob:
|
||||||
if (!qemuDomainObjEndJob(driver, obj))
|
if (!qemuDomainObjEndJob(driver, obj))
|
||||||
obj = NULL;
|
obj = NULL;
|
||||||
|
|
||||||
@ -3307,7 +3307,7 @@ endjob:
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (!qemuDomainObjEndJob(driver, obj))
|
if (!qemuDomainObjEndJob(driver, obj))
|
||||||
obj = NULL;
|
obj = NULL;
|
||||||
|
|
||||||
@ -3411,7 +3411,7 @@ qemuProcessReconnectHelper(virDomainObjPtr obj,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(data);
|
VIR_FREE(data);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -3533,7 +3533,7 @@ qemuProcessSPICEAllocatePorts(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
virPortAllocatorRelease(driver->remotePorts, port);
|
virPortAllocatorRelease(driver->remotePorts, port);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -3597,7 +3597,7 @@ qemuProcessVerifyGuestCPU(virQEMUDriverPtr driver, virDomainObjPtr vm)
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
cpuDataFree(guestcpu);
|
cpuDataFree(guestcpu);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -4198,7 +4198,7 @@ int qemuProcessStart(virConnectPtr conn,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
/* We jump here if we failed to start the VM for any reason, or
|
/* We jump here if we failed to start the VM for any reason, or
|
||||||
* if we failed to initialize the now running VM. kill it off and
|
* if we failed to initialize the now running VM. kill it off and
|
||||||
* pretend we never started it */
|
* pretend we never started it */
|
||||||
@ -4440,7 +4440,7 @@ void qemuProcessStop(virQEMUDriverPtr driver,
|
|||||||
networkReleaseActualDevice(vm->def, net);
|
networkReleaseActualDevice(vm->def, net);
|
||||||
}
|
}
|
||||||
|
|
||||||
retry:
|
retry:
|
||||||
if ((ret = qemuRemoveCgroup(vm)) < 0) {
|
if ((ret = qemuRemoveCgroup(vm)) < 0) {
|
||||||
if (ret == -EBUSY && (retries++ < 5)) {
|
if (ret == -EBUSY && (retries++ < 5)) {
|
||||||
usleep(200*1000);
|
usleep(200*1000);
|
||||||
@ -4741,7 +4741,7 @@ int qemuProcessAttach(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
/* We jump here if we failed to attach to the VM for any reason.
|
/* We jump here if we failed to attach to the VM for any reason.
|
||||||
* Leave the domain running, but pretend we never attempted to
|
* Leave the domain running, but pretend we never attempted to
|
||||||
* attach to it. */
|
* attach to it. */
|
||||||
@ -4800,7 +4800,7 @@ qemuProcessAutoDestroy(virDomainObjPtr dom,
|
|||||||
if (event)
|
if (event)
|
||||||
qemuDomainEventQueue(driver, event);
|
qemuDomainEventQueue(driver, event);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
return dom;
|
return dom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user