---
src/qemu/qemu_agent.c | 26 +--
src/qemu/qemu_capabilities.c | 50 ++---
src/qemu/qemu_cgroup.c | 26 +--
src/qemu/qemu_command.c | 162 +++++++--------
src/qemu/qemu_conf.c | 22 +-
src/qemu/qemu_domain.c | 34 ++--
src/qemu/qemu_driver.c | 464 +++++++++++++++++++++----------------------
src/qemu/qemu_hostdev.c | 6 +-
src/qemu/qemu_hotplug.c | 70 +++----
src/qemu/qemu_migration.c | 106 +++++-----
src/qemu/qemu_monitor.c | 28 +--
src/qemu/qemu_monitor_json.c | 122 ++++++------
src/qemu/qemu_monitor_text.c | 100 +++++-----
src/qemu/qemu_process.c | 72 +++----
14 files changed, 644 insertions(+), 644 deletions(-)
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index 9f02e52..27af1be 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -240,7 +240,7 @@ qemuAgentOpenUnix(const char *monitor, pid_t cpid, bool *inProgress)
return monfd;
-error:
+ error:
VIR_FORCE_CLOSE(monfd);
return -1;
}
@@ -264,7 +264,7 @@ qemuAgentOpenPty(const char *monitor)
return monfd;
-error:
+ error:
VIR_FORCE_CLOSE(monfd);
return -1;
}
@@ -352,7 +352,7 @@ qemuAgentIOProcessLine(qemuAgentPtr mon,
_("Unknown JSON reply '%s'"), line);
}
-cleanup:
+ cleanup:
virJSONValueFree(obj);
return ret;
}
@@ -777,7 +777,7 @@ qemuAgentOpen(virDomainObjPtr vm,
return mon;
-cleanup:
+ cleanup:
/* We don't want the 'destroy' callback invoked during
* cleanup from construction failure, because that can
* give a double-unref on virDomainObjPtr in the caller,
@@ -888,7 +888,7 @@ static int qemuAgentSend(qemuAgentPtr mon,
ret = 0;
-cleanup:
+ cleanup:
mon->msg = NULL;
qemuAgentUpdateWatch(mon);
@@ -959,7 +959,7 @@ qemuAgentGuestSync(qemuAgentPtr mon)
}
ret = 0;
-cleanup:
+ cleanup:
virJSONValueFree(sync_msg.rxObject);
VIR_FREE(sync_msg.txBuffer);
return ret;
@@ -1012,7 +1012,7 @@ qemuAgentCommand(qemuAgentPtr mon,
}
}
-cleanup:
+ cleanup:
VIR_FREE(cmdstr);
VIR_FREE(msg.txBuffer);
@@ -1226,7 +1226,7 @@ qemuAgentMakeCommand(const char *cmdname,
return obj;
-error:
+ error:
virJSONValueFree(obj);
virJSONValueFree(jargs);
va_end(args);
@@ -1317,7 +1317,7 @@ int qemuAgentFSFreeze(qemuAgentPtr mon)
_("malformed return value"));
}
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -1355,7 +1355,7 @@ int qemuAgentFSThaw(qemuAgentPtr mon)
_("malformed return value"));
}
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -1426,7 +1426,7 @@ qemuAgentArbitraryCommand(qemuAgentPtr mon,
ret = -1;
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -1526,7 +1526,7 @@ qemuAgentGetVCPUs(qemuAgentPtr mon,
ret = ndata;
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -1590,7 +1590,7 @@ qemuAgentSetVCPUs(qemuAgentPtr mon,
_("malformed return value"));
}
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
virJSONValueFree(cpu);
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index c71bf60..1e55121 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -482,7 +482,7 @@ virQEMUCapsProbeMachineTypes(virQEMUCapsPtr qemuCaps,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(output);
virCommandFree(cmd);
@@ -546,7 +546,7 @@ virQEMUCapsParseX86Models(const char *output,
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
@@ -595,7 +595,7 @@ virQEMUCapsParsePPCModels(const char *output,
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
@@ -630,7 +630,7 @@ virQEMUCapsProbeCPUModels(virQEMUCapsPtr qemuCaps, uid_t runUid, gid_t
runGid)
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(output);
virCommandFree(cmd);
@@ -840,7 +840,7 @@ virQEMUCapsInitGuest(virCapsPtr caps,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(binary);
VIR_FREE(kvmbin);
virObjectUnref(qemubinCaps);
@@ -848,7 +848,7 @@ cleanup:
return ret;
-error:
+ error:
virCapabilitiesFreeMachines(machines, nmachines);
goto cleanup;
@@ -884,12 +884,12 @@ virQEMUCapsInitCPU(virCapsPtr caps,
ret = 0;
-cleanup:
+ cleanup:
cpuDataFree(data);
return ret;
-error:
+ error:
virCPUDefFree(cpu);
goto cleanup;
}
@@ -937,7 +937,7 @@ virCapsPtr virQEMUCapsInit(virQEMUCapsCachePtr cache)
return caps;
-error:
+ error:
virObjectUnref(caps);
return NULL;
}
@@ -1325,7 +1325,7 @@ int virQEMUCapsParseHelpStr(const char *qemu,
return 0;
-fail:
+ fail:
p = strchr(help, '\n');
if (!p)
p = strchr(help, '\0');
@@ -1334,7 +1334,7 @@ fail:
_("cannot parse %s version number in '%.*s'"),
qemu, (int) (p - help), help);
-cleanup:
+ cleanup:
return -1;
}
@@ -1596,7 +1596,7 @@ virQEMUCapsParseDeviceStrObjectTypes(const char *str,
*types = typelist;
ret = ntypelist;
-cleanup:
+ cleanup:
if (ret < 0)
virQEMUCapsFreeStringList(ntypelist, typelist);
return ret;
@@ -1649,7 +1649,7 @@ virQEMUCapsParseDeviceStrObjectProps(const char *str,
*props = proplist;
ret = nproplist;
-cleanup:
+ cleanup:
if (ret < 0)
virQEMUCapsFreeStringList(nproplist, proplist);
return ret;
@@ -1731,7 +1731,7 @@ virQEMUCapsExtractDeviceStr(const char *qemu,
ret = virQEMUCapsParseDeviceStr(qemuCaps, output);
-cleanup:
+ cleanup:
VIR_FREE(output);
virCommandFree(cmd);
return ret;
@@ -1787,7 +1787,7 @@ virQEMUCapsNew(void)
return qemuCaps;
-error:
+ error:
virObjectUnref(qemuCaps);
return NULL;
}
@@ -1832,7 +1832,7 @@ virQEMUCapsPtr virQEMUCapsNewCopy(virQEMUCapsPtr qemuCaps)
return ret;
-error:
+ error:
virObjectUnref(ret);
return NULL;
}
@@ -1995,7 +1995,7 @@ int virQEMUCapsGetMachineTypesCaps(virQEMUCapsPtr qemuCaps,
return 0;
-error:
+ error:
virCapabilitiesFreeMachines(*machines, *nmachines);
*nmachines = 0;
*machines = NULL;
@@ -2179,7 +2179,7 @@ virQEMUCapsProbeQMPMachineTypes(virQEMUCapsPtr qemuCaps,
ret = 0;
-cleanup:
+ cleanup:
for (i = 0; i < nmachines; i++)
qemuMonitorMachineInfoFree(machines[i]);
VIR_FREE(machines);
@@ -2522,7 +2522,7 @@ virQEMUCapsLoadCache(virQEMUCapsPtr qemuCaps, const char *filename,
VIR_FREE(nodes);
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(str);
VIR_FREE(nodes);
xmlXPathFreeContext(ctxt);
@@ -2815,7 +2815,7 @@ virQEMUCapsInitHelp(virQEMUCapsPtr qemuCaps, uid_t runUid, gid_t
runGid)
goto cleanup;
ret = 0;
-cleanup:
+ cleanup:
virCommandFree(cmd);
VIR_FREE(help);
return ret;
@@ -2928,7 +2928,7 @@ virQEMUCapsInitArchQMPBasic(virQEMUCapsPtr qemuCaps,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(archstr);
return ret;
}
@@ -3013,7 +3013,7 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
goto cleanup;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(package);
return ret;
}
@@ -3140,7 +3140,7 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps,
ret = 0;
-cleanup:
+ cleanup:
if (mon)
virObjectUnlock(mon);
qemuMonitorClose(mon);
@@ -3243,7 +3243,7 @@ virQEMUCapsPtr virQEMUCapsNewForBinary(const char *binary,
return qemuCaps;
-error:
+ error:
virObjectUnref(qemuCaps);
qemuCaps = NULL;
return NULL;
@@ -3301,7 +3301,7 @@ virQEMUCapsCacheNew(const char *libDir,
return cache;
-error:
+ error:
virQEMUCapsCacheFree(cache);
return NULL;
}
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index da8cdbf..e625206 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -313,7 +313,7 @@ qemuSetupHostdevCGroup(virDomainObjPtr vm,
}
ret = 0;
-cleanup:
+ cleanup:
virPCIDeviceFree(pci);
virUSBDeviceFree(usb);
virSCSIDeviceFree(scsi);
@@ -374,7 +374,7 @@ qemuTeardownHostdevCgroup(virDomainObjPtr vm,
}
ret = 0;
-cleanup:
+ cleanup:
virPCIDeviceFree(pci);
VIR_FREE(path);
return ret;
@@ -569,7 +569,7 @@ qemuSetupDevicesCgroup(virQEMUDriverPtr driver,
}
ret = 0;
-cleanup:
+ cleanup:
virObjectUnref(cfg);
return ret;
}
@@ -633,7 +633,7 @@ qemuSetupCpusetCgroup(virDomainObjPtr vm,
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(mem_mask);
VIR_FREE(cpu_mask);
return ret;
@@ -716,9 +716,9 @@ qemuInitCgroup(virQEMUDriverPtr driver,
goto cleanup;
}
-done:
+ done:
ret = 0;
-cleanup:
+ cleanup:
virObjectUnref(cfg);
return ret;
}
@@ -750,9 +750,9 @@ qemuConnectCgroup(virQEMUDriverPtr driver,
&priv->cgroup) < 0)
goto cleanup;
-done:
+ done:
ret = 0;
-cleanup:
+ cleanup:
virObjectUnref(cfg);
return ret;
}
@@ -797,7 +797,7 @@ qemuSetupCgroup(virQEMUDriverPtr driver,
goto cleanup;
ret = 0;
-cleanup:
+ cleanup:
virObjectUnref(caps);
return ret;
}
@@ -827,7 +827,7 @@ qemuSetupCgroupVcpuBW(virCgroupPtr cgroup,
return 0;
-error:
+ error:
if (period) {
virErrorPtr saved = virSaveLastError();
ignore_value(virCgroupSetCpuCfsPeriod(cgroup, old_period));
@@ -875,7 +875,7 @@ qemuSetupCgroupEmulatorPin(virCgroupPtr cgroup,
goto cleanup;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(new_cpus);
return ret;
}
@@ -948,7 +948,7 @@ qemuSetupCgroupForVcpu(virDomainObjPtr vm)
return 0;
-cleanup:
+ cleanup:
if (cgroup_vcpu) {
virCgroupRemove(cgroup_vcpu);
virCgroupFree(&cgroup_vcpu);
@@ -1013,7 +1013,7 @@ qemuSetupCgroupForEmulator(virQEMUDriverPtr driver,
virBitmapFree(cpumap);
return 0;
-cleanup:
+ cleanup:
virBitmapFree(cpumap);
if (cgroup_emulator) {
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 0f8ecdb..b09a5b4 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -196,7 +196,7 @@ qemuPhysIfaceConnect(virDomainDefPtr def,
virObjectUnref(cfg);
return rc;
-error:
+ error:
ignore_value(virNetDevMacVLanDeleteWithVPortProfile(
res_ifname, &net->mac,
virDomainNetGetActualDirectDev(net),
@@ -274,7 +274,7 @@ static int qemuCreateInBridgePortWithHelper(virQEMUDriverConfigPtr
cfg,
*tapfd = -1;
}
-cleanup:
+ cleanup:
virCommandFree(cmd);
VIR_FORCE_CLOSE(pair[0]);
return *tapfd < 0 ? -1 : 0;
@@ -402,7 +402,7 @@ qemuNetworkIfaceConnect(virDomainDefPtr def,
ret = 0;
-cleanup:
+ cleanup:
if (ret < 0) {
size_t i;
for (i = 0; i < *tapfdSize && tapfd[i] >= 0; i++)
@@ -525,7 +525,7 @@ qemuOpenVhostNet(virDomainDefPtr def,
virDomainAuditNetDevice(def, net, "/dev/vhost-net", *vhostfdSize);
return 0;
-error:
+ error:
while (i--)
VIR_FORCE_CLOSE(vhostfd[i]);
@@ -579,7 +579,7 @@ qemuNetworkPrepareDevices(virDomainDefPtr def)
}
}
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
@@ -1155,7 +1155,7 @@ int qemuDomainCCWAddressAssign(virDomainDeviceInfoPtr dev,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(addr);
return ret;
}
@@ -1274,7 +1274,7 @@ qemuDomainCCWAddressSetCreate(void)
addrs->next.assigned = 0;
return addrs;
-error:
+ error:
qemuDomainCCWAddressSetFree(addrs);
return NULL;
}
@@ -1329,7 +1329,7 @@ qemuDomainAssignS390Addresses(virDomainDefPtr def,
}
ret = 0;
-cleanup:
+ cleanup:
qemuDomainCCWAddressSetFree(addrs);
return ret;
@@ -1459,7 +1459,7 @@ int qemuDomainAssignSpaprVIOAddresses(virDomainDefPtr def,
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
@@ -1866,7 +1866,7 @@ qemuCollectPCIAddress(virDomainDefPtr def ATTRIBUTE_UNUSED,
goto cleanup;
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
@@ -1967,7 +1967,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
ret = 0;
-cleanup:
+ cleanup:
qemuDomainPCIAddressSetFree(addrs);
return ret;
@@ -2050,7 +2050,7 @@ qemuDomainPCIAddressSetCreate(virDomainDefPtr def,
return addrs;
-error:
+ error:
qemuDomainPCIAddressSetFree(addrs);
return NULL;
}
@@ -2130,7 +2130,7 @@ qemuDomainPCIAddressReserveAddr(qemuDomainPCIAddressSetPtr addrs,
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(addrStr);
return ret;
}
@@ -2180,7 +2180,7 @@ int qemuDomainPCIAddressEnsureAddr(qemuDomainPCIAddressSetPtr
addrs,
ret = qemuDomainPCIAddressReserveNextSlot(addrs, dev, flags);
}
-cleanup:
+ cleanup:
VIR_FREE(addrStr);
return ret;
}
@@ -2212,7 +2212,7 @@ qemuDomainPCIAddressReleaseSlot(qemuDomainPCIAddressSetPtr addrs,
addrs->buses[addr->bus].slots[addr->slot] = 0;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(addrStr);
return ret;
}
@@ -2303,11 +2303,11 @@ qemuDomainPCIAddressGetNextSlot(qemuDomainPCIAddressSetPtr addrs,
virReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("No more available PCI slots"));
-error:
+ error:
VIR_FREE(addrStr);
return -1;
-success:
+ success:
VIR_DEBUG("Found free PCI slot %.4x:%.2x:%.2x",
a.domain, a.bus, a.slot);
*next_addr = a;
@@ -2499,7 +2499,7 @@ qemuValidateDevicePCISlotsPIIX3(virDomainDefPtr def,
}
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(addrStr);
return ret;
}
@@ -2669,7 +2669,7 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
}
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(addrStr);
return ret;
}
@@ -2995,7 +2995,7 @@ qemuAssignDevicePCISlots(virDomainDefPtr def,
return 0;
-error:
+ error:
return -1;
}
@@ -3111,7 +3111,7 @@ qemuBuildDeviceAddressStr(virBufferPtr buf,
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(devStr);
return ret;
}
@@ -3243,7 +3243,7 @@ qemuGetSecretString(virConnectPtr conn,
secret = base64;
}
-cleanup:
+ cleanup:
virObjectUnref(sec);
return secret;
}
@@ -3290,7 +3290,7 @@ static int qemuAddRBDHost(virDomainDiskDefPtr disk, char *hostport)
return 0;
-error:
+ error:
VIR_FREE(disk->src.hosts[disk->src.nhosts-1].port);
VIR_FREE(disk->src.hosts[disk->src.nhosts-1].name);
return -1;
@@ -3359,7 +3359,7 @@ static int qemuParseRBDString(virDomainDiskDefPtr disk)
VIR_FREE(options);
return 0;
-error:
+ error:
VIR_FREE(options);
return -1;
}
@@ -3441,12 +3441,12 @@ qemuParseDriveURIString(virDomainDiskDefPtr def, virURIPtr uri,
def->src.nhosts = 1;
ret = 0;
-cleanup:
+ cleanup:
virURIFree(uri);
return ret;
-error:
+ error:
virDomainDiskHostDefClear(def->src.hosts);
VIR_FREE(def->src.hosts);
goto cleanup;
@@ -3549,7 +3549,7 @@ qemuParseNBDString(virDomainDiskDefPtr disk)
disk->src.hosts = h;
return 0;
-error:
+ error:
virDomainDiskHostDefClear(h);
VIR_FREE(h);
return -1;
@@ -3813,7 +3813,7 @@ qemuBuildNetworkDriveURI(int protocol,
goto cleanup;
}
-cleanup:
+ cleanup:
virBufferFreeAndReset(&buf);
virURIFree(uri);
@@ -3907,7 +3907,7 @@ qemuDomainDiskGetSourceString(virConnectPtr conn,
secret,
source);
-cleanup:
+ cleanup:
VIR_FREE(secret);
return ret;
}
@@ -4270,7 +4270,7 @@ qemuBuildDriveStr(virConnectPtr conn,
return virBufferContentAndReset(&opt);
-error:
+ error:
VIR_FREE(source);
virBufferFreeAndReset(&opt);
return NULL;
@@ -4612,7 +4612,7 @@ qemuBuildDriveDevStr(virDomainDefPtr def,
return virBufferContentAndReset(&opt);
-error:
+ error:
virBufferFreeAndReset(&opt);
return NULL;
}
@@ -4688,7 +4688,7 @@ char *qemuBuildFSStr(virDomainFSDefPtr fs,
return virBufferContentAndReset(&opt);
-error:
+ error:
virBufferFreeAndReset(&opt);
return NULL;
}
@@ -4722,7 +4722,7 @@ qemuBuildFSDevStr(virDomainDefPtr def,
return virBufferContentAndReset(&opt);
-error:
+ error:
virBufferFreeAndReset(&opt);
return NULL;
}
@@ -4948,7 +4948,7 @@ qemuBuildControllerDevStr(virDomainDefPtr domainDef,
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -5061,7 +5061,7 @@ qemuBuildNicDevStr(virDomainDefPtr def,
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -5226,7 +5226,7 @@ qemuBuildWatchdogDevStr(virDomainDefPtr def,
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -5267,7 +5267,7 @@ qemuBuildMemballoonDevStr(virDomainDefPtr def,
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -5294,7 +5294,7 @@ qemuBuildNVRAMDevStr(virDomainNVRAMDefPtr dev)
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -5330,7 +5330,7 @@ qemuBuildUSBInputDevStr(virDomainDefPtr def,
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -5383,7 +5383,7 @@ qemuBuildSoundDevStr(virDomainDefPtr def,
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -5427,7 +5427,7 @@ qemuBuildSoundCodecStr(virDomainSoundDefPtr sound,
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -5498,7 +5498,7 @@ qemuBuildDeviceVideoStr(virDomainDefPtr def,
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -5574,7 +5574,7 @@ qemuBuildPCIHostdevDevStr(virDomainDefPtr def,
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -5678,7 +5678,7 @@ qemuBuildRedirdevDevStr(virDomainDefPtr def,
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -5718,7 +5718,7 @@ qemuBuildUSBHostdevDevStr(virDomainDefPtr def,
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -5756,7 +5756,7 @@ qemuBuildHubDevStr(virDomainDefPtr def,
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -5825,7 +5825,7 @@ qemuBuildSCSIHostdevDrvStr(virDomainHostdevDefPtr dev,
VIR_FREE(sg);
return virBufferContentAndReset(&buf);
-error:
+ error:
VIR_FREE(sg);
virBufferFreeAndReset(&buf);
return NULL;
@@ -5889,7 +5889,7 @@ qemuBuildSCSIHostdevDevStr(virDomainDefPtr def,
}
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -6010,7 +6010,7 @@ qemuBuildChrChardevStr(virDomainChrSourceDefPtr dev, const char
*alias,
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -6105,7 +6105,7 @@ qemuBuildChrArgStr(virDomainChrSourceDefPtr dev, const char
*prefix)
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -6185,7 +6185,7 @@ qemuBuildVirtioSerialPortDevStr(virDomainChrDefPtr dev,
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -6217,7 +6217,7 @@ qemuBuildSclpDevStr(virDomainChrDefPtr dev)
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -6275,7 +6275,7 @@ qemuBuildRNGBackendArgs(virCommandPtr cmd,
ret = 0;
-cleanup:
+ cleanup:
virBufferFreeAndReset(&buf);
VIR_FREE(backend);
return ret;
@@ -6324,7 +6324,7 @@ qemuBuildRNGDeviceArgs(virCommandPtr cmd,
ret = 0;
-cleanup:
+ cleanup:
virBufferFreeAndReset(&buf);
return ret;
}
@@ -6444,7 +6444,7 @@ static char *qemuBuildSmbiosBiosStr(virSysinfoDefPtr def)
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -6491,7 +6491,7 @@ static char *qemuBuildSmbiosSystemStr(virSysinfoDefPtr def, bool
skip_uuid)
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -6595,7 +6595,7 @@ qemuBuildClockArgStr(virDomainClockDefPtr def)
return virBufferContentAndReset(&buf);
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
@@ -6838,7 +6838,7 @@ qemuBuildCpuArgStr(virQEMUDriverPtr driver,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(compare_msg);
cpuDataFree(data);
virCPUDefFree(guest);
@@ -7085,7 +7085,7 @@ qemuBuildNumaArgStr(const virDomainDef *def, virCommandPtr cmd)
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cpumask);
virBufferFreeAndReset(&buf);
return ret;
@@ -7231,7 +7231,7 @@ qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfigPtr cfg,
return 0;
-error:
+ error:
VIR_FREE(netAddr);
virBufferFreeAndReset(&opt);
return -1;
@@ -7456,7 +7456,7 @@ qemuBuildGraphicsSPICECommandLine(virQEMUDriverConfigPtr cfg,
return 0;
-error:
+ error:
VIR_FREE(netAddr);
virBufferFreeAndReset(&opt);
return -1;
@@ -7657,7 +7657,7 @@ qemuBuildInterfaceCommandLine(virCommandPtr cmd,
}
ret = 0;
-cleanup:
+ cleanup:
if (ret < 0)
virDomainConfNWFilterTeardown(net);
for (i = 0; tapfd && i < tapfdSize && tapfd[i] >= 0; i++) {
@@ -9742,7 +9742,7 @@ qemuBuildCommandLine(virConnectPtr conn,
virObjectUnref(cfg);
return cmd;
-error:
+ error:
virObjectUnref(cfg);
/* free up any resources in the network driver
* but don't overwrite the original error */
@@ -9808,7 +9808,7 @@ qemuBuildSerialChrDeviceStr(char **deviceStr,
*deviceStr = virBufferContentAndReset(&cmd);
return 0;
-error:
+ error:
virBufferFreeAndReset(&cmd);
return -1;
}
@@ -9861,7 +9861,7 @@ qemuBuildChannelChrDeviceStr(char **deviceStr,
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(addr);
return ret;
}
@@ -9896,7 +9896,7 @@ qemuBuildConsoleChrDeviceStr(char **deviceStr,
}
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
@@ -10029,7 +10029,7 @@ static int qemuStringToArgvEnv(const char *args,
return 0;
-error:
+ error:
VIR_FREE(progenv);
VIR_FREE(progargv);
virStringFreeList(arglist);
@@ -10151,7 +10151,7 @@ qemuParseKeywords(const char *str,
*retnkeywords = keywordCount;
return 0;
-error:
+ error:
for (i = 0; i < keywordCount; i++) {
VIR_FREE(keywords[i]);
VIR_FREE(values[i]);
@@ -10481,7 +10481,7 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt,
/* fall through to "cleanup" */
}
-cleanup:
+ cleanup:
for (i = 0; i < nkeywords; i++) {
VIR_FREE(keywords[i]);
VIR_FREE(values[i]);
@@ -10490,7 +10490,7 @@ cleanup:
VIR_FREE(values);
return def;
-error:
+ error:
virDomainDiskDefFree(def);
def = NULL;
goto cleanup;
@@ -10677,7 +10677,7 @@ qemuParseCommandLineNet(virDomainXMLOptionPtr xmlopt,
if (genmac)
virDomainNetGenerateMAC(xmlopt, &def->mac);
-cleanup:
+ cleanup:
for (i = 0; i < nkeywords; i++) {
VIR_FREE(keywords[i]);
VIR_FREE(values[i]);
@@ -10907,7 +10907,7 @@ qemuParseCommandLineChr(virDomainChrSourceDefPtr source,
return 0;
-error:
+ error:
return -1;
}
@@ -11112,13 +11112,13 @@ qemuParseCommandLineCPU(virDomainDefPtr dom,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(model);
virStringFreeList(tokens);
virStringFreeList(hv_tokens);
return ret;
-syntax:
+ syntax:
virReportError(VIR_ERR_INTERNAL_ERROR,
_("unknown CPU syntax '%s'"), val);
goto cleanup;
@@ -11181,7 +11181,7 @@ qemuParseCommandLineSmp(virDomainDefPtr dom,
ret = 0;
-cleanup:
+ cleanup:
for (i = 0; i < nkws; i++) {
VIR_FREE(kws[i]);
VIR_FREE(vals[i]);
@@ -11191,10 +11191,10 @@ cleanup:
return ret;
-syntax:
+ syntax:
virReportError(VIR_ERR_INTERNAL_ERROR,
_("cannot parse CPU topology '%s'"), val);
-error:
+ error:
ret = -1;
goto cleanup;
}
@@ -12167,7 +12167,7 @@ qemuParseCommandLine(virCapsPtr qemuCaps,
return def;
-error:
+ error:
virDomainDiskDefFree(disk);
qemuDomainCmdlineDefFree(cmd);
virDomainDefFree(def);
@@ -12199,7 +12199,7 @@ virDomainDefPtr qemuParseCommandLineString(virCapsPtr qemuCaps,
def = qemuParseCommandLine(qemuCaps, xmlopt, progenv, progargv,
pidfile, monConfig, monJSON);
-cleanup:
+ cleanup:
virStringFreeList(progargv);
virStringFreeList(progenv);
@@ -12246,7 +12246,7 @@ static int qemuParseProcFileStrings(int pid_value,
ret = nstr-1;
*list = str;
-cleanup:
+ cleanup:
if (ret < 0)
virStringFreeList(str);
VIR_FREE(data);
@@ -12290,7 +12290,7 @@ virDomainDefPtr qemuParseCommandLinePid(virCapsPtr qemuCaps,
VIR_FREE(def->emulator);
def->emulator = emulator;
-cleanup:
+ cleanup:
VIR_FREE(exepath);
virStringFreeList(progargv);
virStringFreeList(progenv);
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 0d6bcfe..dc9b3ae 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -257,7 +257,7 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged)
return cfg;
-error:
+ error:
virObjectUnref(cfg);
return NULL;
}
@@ -578,7 +578,7 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
ret = 0;
-cleanup:
+ cleanup:
virConfFree(conf);
return ret;
}
@@ -662,7 +662,7 @@ virCapsPtr virQEMUDriverCreateCapabilities(virQEMUDriverPtr driver)
virObjectUnref(cfg);
return caps;
-error:
+ error:
VIR_FREE(sec_managers);
virObjectUnref(caps);
virObjectUnref(cfg);
@@ -806,7 +806,7 @@ qemuCheckSharedDevice(virHashTablePtr sharedDevices,
}
ret = -1;
-cleanup:
+ cleanup:
VIR_FREE(sysfs_path);
VIR_FREE(key);
return ret;
@@ -866,7 +866,7 @@ qemuSharedDeviceEntryCopy(const qemuSharedDeviceEntry *entry)
return ret;
-cleanup:
+ cleanup:
qemuSharedDeviceEntryFree(ret, NULL);
return NULL;
}
@@ -973,7 +973,7 @@ qemuAddSharedDevice(virQEMUDriverPtr driver,
}
ret = 0;
-cleanup:
+ cleanup:
qemuDriverUnlock(driver);
VIR_FREE(dev_name);
VIR_FREE(dev_path);
@@ -1067,7 +1067,7 @@ qemuRemoveSharedDevice(virQEMUDriverPtr driver,
}
ret = 0;
-cleanup:
+ cleanup:
qemuDriverUnlock(driver);
VIR_FREE(dev_name);
VIR_FREE(dev_path);
@@ -1133,7 +1133,7 @@ qemuSetUnprivSGIO(virDomainDeviceDefPtr dev)
virSetDeviceUnprivSGIO(path, NULL, val) < 0)
ret = -1;
-cleanup:
+ cleanup:
VIR_FREE(sysfs_path);
return ret;
}
@@ -1199,7 +1199,7 @@ qemuAddISCSIPoolSourceHost(virDomainDiskDefPtr def,
ret = 0;
-cleanup:
+ cleanup:
virStringFreeList(tokens);
return ret;
}
@@ -1252,7 +1252,7 @@ qemuTranslateDiskSourcePoolAuth(virDomainDiskDefPtr def,
}
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
@@ -1400,7 +1400,7 @@ qemuTranslateDiskSourcePool(virConnectPtr conn,
}
ret = 0;
-cleanup:
+ cleanup:
if (ret < 0)
savedError = virSaveLastError();
if (pool)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 6fea543..36cb2c6 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -232,7 +232,7 @@ qemuDomainObjPrivateAlloc(void)
return priv;
-error:
+ error:
VIR_FREE(priv);
return NULL;
}
@@ -520,7 +520,7 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, void *data)
return 0;
-error:
+ error:
virDomainChrSourceDefFree(priv->monConfig);
priv->monConfig = NULL;
VIR_FREE(nodes);
@@ -643,7 +643,7 @@ qemuDomainDefNamespaceParse(xmlDocPtr xml ATTRIBUTE_UNUSED,
return 0;
-error:
+ error:
VIR_FREE(nodes);
qemuDomainDefNamespaceFree(cmd);
return -1;
@@ -934,7 +934,7 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
ret = 0;
-cleanup:
+ cleanup:
virObjectUnref(cfg);
return ret;
}
@@ -1071,7 +1071,7 @@ qemuDomainObjBeginJobInternal(virQEMUDriverPtr driver,
virObjectRef(obj);
-retry:
+ retry:
if (cfg->maxQueuedJobs &&
priv->jobs_queued > cfg->maxQueuedJobs) {
goto error;
@@ -1119,7 +1119,7 @@ retry:
virObjectUnref(cfg);
return 0;
-error:
+ error:
VIR_WARN("Cannot start job (%s, %s) for domain %s;"
" current job is (%s, %s) owned by (%llu, %llu)",
qemuDomainJobTypeToString(job),
@@ -1451,7 +1451,7 @@ qemuDomainDefCopy(virQEMUDriverPtr driver,
VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
-cleanup:
+ cleanup:
VIR_FREE(xml);
virObjectUnref(caps);
return ret;
@@ -1558,7 +1558,7 @@ qemuDomainDefFormatBuf(virQEMUDriverPtr driver,
ret = virDomainDefFormatInternal(def, flags, buf);
-cleanup:
+ cleanup:
def->cpu = def_cpu;
virCPUDefFree(cpu);
if (controllers) {
@@ -1766,7 +1766,7 @@ qemuDomainOpenLogHelper(virQEMUDriverConfigPtr cfg,
goto cleanup;
}
-cleanup:
+ cleanup:
VIR_FREE(logfile);
return fd;
}
@@ -1856,7 +1856,7 @@ int qemuDomainAppendLog(virQEMUDriverPtr driver,
ret = 0;
-cleanup:
+ cleanup:
va_end(argptr);
if (fd != logFD)
@@ -1907,7 +1907,7 @@ qemuDomainSnapshotWriteMetadata(virDomainObjPtr vm,
ret = virXMLSaveFile(snapFile, NULL, "snapshot-edit", newxml);
-cleanup:
+ cleanup:
VIR_FREE(snapFile);
VIR_FREE(snapDir);
VIR_FREE(newxml);
@@ -2066,7 +2066,7 @@ qemuDomainSnapshotDiscard(virQEMUDriverPtr driver,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(snapFile);
virObjectUnref(cfg);
return ret;
@@ -2150,7 +2150,7 @@ qemuDomainSetFakeReboot(virQEMUDriverPtr driver,
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
VIR_WARN("Failed to save status on vm %s", vm->def->name);
-cleanup:
+ cleanup:
virObjectUnref(cfg);
}
@@ -2230,7 +2230,7 @@ qemuDomainCheckDiskStartupPolicy(virQEMUDriverPtr driver,
return 0;
-error:
+ error:
return -1;
}
@@ -2266,7 +2266,7 @@ qemuDomainCheckDiskPresence(virQEMUDriverPtr driver,
ret = 0;
-error:
+ error:
return ret;
}
@@ -2426,7 +2426,7 @@ qemuDomainDetermineDiskChain(virQEMUDriverPtr driver,
if (!disk->backingChain)
ret = -1;
-cleanup:
+ cleanup:
virObjectUnref(cfg);
return ret;
}
@@ -2469,7 +2469,7 @@ qemuDomainDefCheckABIStability(virQEMUDriverPtr driver,
ret = virDomainDefCheckABIStability(migratableDefSrc, migratableDefDst);
-cleanup:
+ cleanup:
virDomainDefFree(migratableDefSrc);
virDomainDefFree(migratableDefDst);
return ret;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 76f789e..05e4c74 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -299,7 +299,7 @@ qemuAutostartDomain(virDomainObjPtr vm,
}
ret = 0;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(cfg);
@@ -389,7 +389,7 @@ qemuSecurityInit(virQEMUDriverPtr driver)
virObjectUnref(cfg);
return 0;
-error:
+ error:
VIR_ERROR(_("Failed to initialize security drivers"));
virObjectUnref(stack);
virObjectUnref(mgr);
@@ -508,7 +508,7 @@ qemuDomainSnapshotLoad(virDomainObjPtr vm,
virResetLastError();
ret = 0;
-cleanup:
+ cleanup:
if (dir)
closedir(dir);
VIR_FREE(snapDir);
@@ -837,7 +837,7 @@ qemuStateInitialize(bool privileged,
virNWFilterRegisterCallbackDriver(&qemuCallbackDriver);
return 0;
-error:
+ error:
virObjectUnref(conn);
VIR_FREE(driverConf);
VIR_FREE(membase);
@@ -899,7 +899,7 @@ qemuStateReload(void)
caps, qemu_driver->xmlopt,
QEMU_EXPECTED_VIRT_TYPES,
qemuNotifyLoadDomain, qemu_driver);
-cleanup:
+ cleanup:
virObjectUnref(cfg);
virObjectUnref(caps);
return 0;
@@ -1083,7 +1083,7 @@ static virDrvOpenStatus qemuConnectOpen(virConnectPtr conn,
conn->privateData = qemu_driver;
ret = VIR_DRV_OPEN_SUCCESS;
-cleanup:
+ cleanup:
virObjectUnref(cfg);
return ret;
}
@@ -1175,7 +1175,7 @@ kvmGetMaxVCPUs(void)
* that 4 should be used as the maximum number of cpus */
ret = 4;
-cleanup:
+ cleanup:
VIR_FORCE_CLOSE(fd);
return ret;
}
@@ -1246,7 +1246,7 @@ static char *qemuConnectGetCapabilities(virConnectPtr conn) {
virReportOOMError();
virObjectUnref(caps);
-cleanup:
+ cleanup:
return xml;
}
@@ -1349,7 +1349,7 @@ static virDomainPtr qemuDomainLookupByID(virConnectPtr conn,
dom = virGetDomain(conn, vm->def->name, vm->def->uuid);
if (dom) dom->id = vm->def->id;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return dom;
@@ -1378,7 +1378,7 @@ static virDomainPtr qemuDomainLookupByUUID(virConnectPtr conn,
dom = virGetDomain(conn, vm->def->name, vm->def->uuid);
if (dom) dom->id = vm->def->id;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return dom;
@@ -1405,7 +1405,7 @@ static virDomainPtr qemuDomainLookupByName(virConnectPtr conn,
dom = virGetDomain(conn, vm->def->name, vm->def->uuid);
if (dom) dom->id = vm->def->id;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return dom;
@@ -1425,7 +1425,7 @@ static int qemuDomainIsActive(virDomainPtr dom)
ret = virDomainObjIsActive(obj);
-cleanup:
+ cleanup:
if (obj)
virObjectUnlock(obj);
return ret;
@@ -1444,7 +1444,7 @@ static int qemuDomainIsPersistent(virDomainPtr dom)
ret = obj->persistent;
-cleanup:
+ cleanup:
if (obj)
virObjectUnlock(obj);
return ret;
@@ -1463,7 +1463,7 @@ static int qemuDomainIsUpdated(virDomainPtr dom)
ret = obj->updated;
-cleanup:
+ cleanup:
if (obj)
virObjectUnlock(obj);
return ret;
@@ -1490,7 +1490,7 @@ static int qemuConnectGetVersion(virConnectPtr conn, unsigned long
*version)
*version = qemuVersion;
ret = 0;
-cleanup:
+ cleanup:
virObjectUnref(caps);
return ret;
}
@@ -1647,7 +1647,7 @@ static virDomainPtr qemuDomainCreateXML(virConnectPtr conn,
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
virDomainDefFree(def);
if (vm)
virObjectUnlock(vm);
@@ -1730,11 +1730,11 @@ static int qemuDomainSuspend(virDomainPtr dom)
goto endjob;
ret = 0;
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
@@ -1796,11 +1796,11 @@ static int qemuDomainResume(virDomainPtr dom)
goto endjob;
ret = 0;
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
if (event)
@@ -1879,11 +1879,11 @@ static int qemuDomainShutdownFlags(virDomainPtr dom, unsigned int
flags)
qemuDomainObjExitMonitor(driver, vm);
}
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -1979,11 +1979,11 @@ qemuDomainReboot(virDomainPtr dom, unsigned int flags)
qemuDomainSetFakeReboot(driver, vm, isReboot);
}
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -2022,11 +2022,11 @@ qemuDomainReset(virDomainPtr dom, unsigned int flags)
priv->fakeReboot = false;
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -2115,11 +2115,11 @@ qemuDomainDestroyFlags(virDomainPtr dom,
}
ret = 0;
-endjob:
+ endjob:
if (vm && !qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
if (event)
@@ -2145,7 +2145,7 @@ static char *qemuDomainGetOSType(virDomainPtr dom) {
ignore_value(VIR_STRDUP(type, vm->def->os.type));
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return type;
@@ -2166,7 +2166,7 @@ qemuDomainGetMaxMemory(virDomainPtr dom)
ret = vm->def->mem.max_balloon;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -2269,11 +2269,11 @@ static int qemuDomainSetMemoryFlags(virDomainPtr dom, unsigned
long newmem,
}
ret = 0;
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(caps);
@@ -2343,11 +2343,11 @@ static int qemuDomainSetMemoryStatsPeriod(virDomainPtr dom, int
period,
}
ret = 0;
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(caps);
@@ -2391,11 +2391,11 @@ static int qemuDomainInjectNMI(virDomainPtr domain, unsigned int
flags)
ret = qemuMonitorInjectNMI(priv->mon);
qemuDomainObjExitMonitor(driver, vm);
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -2455,11 +2455,11 @@ static int qemuDomainSendKey(virDomainPtr domain,
ret = qemuMonitorSendKey(priv->mon, holdtime, keycodes, nkeycodes);
qemuDomainObjExitMonitor(driver, vm);
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -2539,7 +2539,7 @@ static int qemuDomainGetInfo(virDomainPtr dom,
info->nrVirtCpu = vm->def->vcpus;
ret = 0;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -2565,7 +2565,7 @@ qemuDomainGetState(virDomainPtr dom,
*state = virDomainObjGetState(vm, reason);
ret = 0;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -2618,7 +2618,7 @@ qemuDomainGetControlInfo(virDomainPtr dom,
ret = 0;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -2708,7 +2708,7 @@ qemuDomainSaveHeader(int fd, const char *path, const char *xml,
_("failed to write xml to '%s'"), path);
goto endjob;
}
-endjob:
+ endjob:
return ret;
}
@@ -2878,14 +2878,14 @@ qemuOpenFileAs(uid_t fallback_uid, gid_t fallback_gid,
bypass_security = true;
}
}
-cleanup:
+ cleanup:
if (needUnlink)
*needUnlink = need_unlink;
if (bypassSecurityDriver)
*bypassSecurityDriver = bypass_security;
return fd;
-error:
+ error:
virReportSystemError(-fd, oflags & O_CREAT
? _("Failed to create file '%s'")
: _("Failed to open file '%s'"),
@@ -3008,7 +3008,7 @@ qemuDomainSaveMemory(virQEMUDriverPtr driver,
ret = 0;
-cleanup:
+ cleanup:
VIR_FORCE_CLOSE(fd);
virFileWrapperFdFree(wrapperFd);
VIR_FREE(xml);
@@ -3112,7 +3112,7 @@ qemuDomainSaveInternal(virQEMUDriverPtr driver, virDomainPtr dom,
vm = NULL;
}
-endjob:
+ endjob:
if (vm) {
if (ret != 0) {
if (was_running && virDomainObjIsActive(vm)) {
@@ -3131,7 +3131,7 @@ endjob:
vm = NULL;
}
-cleanup:
+ cleanup:
VIR_FREE(xml);
if (event)
qemuDomainEventQueue(driver, event);
@@ -3204,7 +3204,7 @@ qemuDomainSaveFlags(virDomainPtr dom, const char *path, const char
*dxml,
dxml, flags);
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(cfg);
@@ -3291,7 +3291,7 @@ qemuDomainManagedSave(virDomainPtr dom, unsigned int flags)
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
VIR_FREE(name);
@@ -3316,7 +3316,7 @@ qemuDomainManagedSaveLoad(virDomainObjPtr vm,
vm->hasManagedSave = virFileExists(name);
ret = 0;
-cleanup:
+ cleanup:
virObjectUnlock(vm);
VIR_FREE(name);
return ret;
@@ -3339,7 +3339,7 @@ qemuDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags)
ret = vm->hasManagedSave;
-cleanup:
+ cleanup:
virObjectUnlock(vm);
return ret;
}
@@ -3373,7 +3373,7 @@ qemuDomainManagedSaveRemove(virDomainPtr dom, unsigned int flags)
vm->hasManagedSave = false;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(name);
virObjectUnlock(vm);
return ret;
@@ -3414,7 +3414,7 @@ static int qemuDumpToFd(virQEMUDriverPtr driver, virDomainObjPtr
vm,
ret = qemuMonitorDumpToFd(priv->mon, fd, dumpformat);
-cleanup:
+ cleanup:
qemuDomainObjExitMonitor(driver, vm);
return ret;
@@ -3495,7 +3495,7 @@ doCoreDump(virQEMUDriverPtr driver,
ret = 0;
-cleanup:
+ cleanup:
VIR_FORCE_CLOSE(fd);
if (ret != 0)
unlink(path);
@@ -3532,7 +3532,7 @@ getCompressionType(virQEMUDriverPtr driver)
goto cleanup;
}
}
-cleanup:
+ cleanup:
virObjectUnref(cfg);
return ret;
}
@@ -3595,7 +3595,7 @@ static int qemuDomainCoreDumpWithFormat(virDomainPtr dom,
paused = true;
-endjob:
+ endjob:
if ((ret == 0) && (flags & VIR_DUMP_CRASH)) {
qemuProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_CRASHED, 0);
virDomainAuditStop(vm, "crashed");
@@ -3635,7 +3635,7 @@ endjob:
vm = NULL;
}
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
if (event)
@@ -3726,7 +3726,7 @@ qemuDomainScreenshot(virDomainPtr dom,
ignore_value(VIR_STRDUP(ret, "image/x-portable-pixmap"));
-endjob:
+ endjob:
VIR_FORCE_CLOSE(tmp_fd);
if (unlink_tmp)
unlink(tmp);
@@ -3735,7 +3735,7 @@ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(cfg);
@@ -3795,13 +3795,13 @@ static void processWatchdogEvent(virQEMUDriverPtr driver,
virDomainObjPtr vm, in
goto cleanup;
}
-endjob:
+ endjob:
/* Safe to ignore value since ref count was incremented in
* qemuProcessHandleWatchdog().
*/
ignore_value(qemuDomainObjEndAsyncJob(driver, vm));
-cleanup:
+ cleanup:
virObjectUnref(cfg);
}
@@ -3845,13 +3845,13 @@ doCoreDumpToAutoDumpPath(virQEMUDriverPtr driver,
virReportError(VIR_ERR_OPERATION_FAILED,
"%s", _("Dump failed"));
-endjob:
+ endjob:
/* Safe to ignore value since ref count was incremented in
* qemuProcessHandleGuestPanic().
*/
ignore_value(qemuDomainObjEndAsyncJob(driver, vm));
-cleanup:
+ cleanup:
VIR_FREE(dumpfile);
virObjectUnref(cfg);
return ret;
@@ -3948,7 +3948,7 @@ processGuestPanicEvent(virQEMUDriverPtr driver,
break;
}
-cleanup:
+ cleanup:
virObjectUnref(cfg);
}
@@ -4143,7 +4143,7 @@ static int qemuDomainHotplugVcpus(virQEMUDriverPtr driver,
priv->vcpupids = cpupids;
cpupids = NULL;
-cleanup:
+ cleanup:
qemuDomainObjExitMonitor(driver, vm);
vm->def->vcpus = vcpus;
VIR_FREE(cpupids);
@@ -4152,7 +4152,7 @@ cleanup:
virCgroupFree(&cgroup_vcpu);
return ret;
-unsupported:
+ unsupported:
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("cannot change vcpu count of this domain"));
goto cleanup;
@@ -4295,11 +4295,11 @@ qemuDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
ret = 0;
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(caps);
@@ -4482,7 +4482,7 @@ qemuDomainPinVcpuFlags(virDomainPtr dom,
ret = 0;
-cleanup:
+ cleanup:
if (cgroup_vcpu)
virCgroupFree(&cgroup_vcpu);
if (vm)
@@ -4585,7 +4585,7 @@ qemuDomainGetVcpuPinInfo(virDomainPtr dom,
}
ret = ncpumaps;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(caps);
@@ -4742,7 +4742,7 @@ qemuDomainPinEmulator(virDomainPtr dom,
ret = 0;
-cleanup:
+ cleanup:
if (cgroup_emulator)
virCgroupFree(&cgroup_emulator);
virBitmapFree(pcpumap);
@@ -4821,7 +4821,7 @@ qemuDomainGetEmulatorPinInfo(virDomainPtr dom,
ret = 1;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(caps);
@@ -4916,7 +4916,7 @@ qemuDomainGetVcpus(virDomainPtr dom,
}
ret = maxinfo;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -4983,7 +4983,7 @@ qemuDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags)
ncpuinfo = qemuAgentGetVCPUs(priv->agent, &cpuinfo);
qemuDomainObjExitAgent(vm);
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
@@ -5009,7 +5009,7 @@ endjob:
}
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(caps);
@@ -5070,7 +5070,7 @@ static int qemuDomainGetSecurityLabel(virDomainPtr dom,
virSecurityLabelPtr secl
ret = 0;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -5136,7 +5136,7 @@ static int qemuDomainGetSecurityLabelList(virDomainPtr dom,
VIR_FREE(mgrs);
}
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -5184,7 +5184,7 @@ static int qemuNodeGetSecurityModel(virConnectPtr conn,
}
strcpy(secmodel->doi, p);
-cleanup:
+ cleanup:
virObjectUnref(caps);
return ret;
}
@@ -5359,7 +5359,7 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver,
return fd;
-error:
+ error:
virDomainDefFree(def);
VIR_FREE(xml);
VIR_FORCE_CLOSE(fd);
@@ -5470,7 +5470,7 @@ qemuDomainSaveImageStartVM(virConnectPtr conn,
ret = 0;
-cleanup:
+ cleanup:
virCommandFree(cmd);
VIR_FREE(errbuf);
if (virSecurityManagerRestoreSavedStateLabel(driver->securityManager,
@@ -5537,7 +5537,7 @@ qemuDomainRestoreFlags(virConnectPtr conn,
vm = NULL;
}
-cleanup:
+ cleanup:
virDomainDefFree(def);
VIR_FORCE_CLOSE(fd);
virFileWrapperFdFree(wrapperFd);
@@ -5577,7 +5577,7 @@ qemuDomainSaveImageGetXMLDesc(virConnectPtr conn, const char *path,
ret = qemuDomainDefFormatXML(driver, def, flags);
-cleanup:
+ cleanup:
virDomainDefFree(def);
VIR_FORCE_CLOSE(fd);
return ret;
@@ -5646,7 +5646,7 @@ qemuDomainSaveImageDefineXML(virConnectPtr conn, const char *path,
ret = 0;
-cleanup:
+ cleanup:
virDomainDefFree(def);
VIR_FORCE_CLOSE(fd);
VIR_FREE(xml);
@@ -5700,7 +5700,7 @@ qemuDomainObjRestore(virConnectPtr conn,
if (virFileWrapperFdClose(wrapperFd) < 0)
VIR_WARN("Failed to close %s", path);
-cleanup:
+ cleanup:
virDomainDefFree(def);
VIR_FORCE_CLOSE(fd);
virFileWrapperFdFree(wrapperFd);
@@ -5749,7 +5749,7 @@ static char *qemuDomainGetXMLDesc(virDomainPtr dom,
err = qemuMonitorGetBalloonInfo(priv->mon, &balloon);
qemuDomainObjExitMonitor(driver, vm);
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm)) {
vm = NULL;
goto cleanup;
@@ -5767,7 +5767,7 @@ endjob:
ret = qemuDomainFormatXML(driver, vm, flags);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -5808,7 +5808,7 @@ static char *qemuConnectDomainXMLFromNative(virConnectPtr conn,
xml = qemuDomainDefFormatXML(driver, def, VIR_DOMAIN_XML_INACTIVE);
-cleanup:
+ cleanup:
virDomainDefFree(def);
virObjectUnref(caps);
return xml;
@@ -6000,7 +6000,7 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
ret = virCommandToString(cmd);
-cleanup:
+ cleanup:
virObjectUnref(qemuCaps);
virCommandFree(cmd);
@@ -6023,7 +6023,7 @@ static int qemuConnectListDefinedDomains(virConnectPtr conn,
virConnectListDefinedDomainsCheckACL,
conn);
-cleanup:
+ cleanup:
return ret;
}
@@ -6039,7 +6039,7 @@ static int qemuConnectNumOfDefinedDomains(virConnectPtr conn)
virConnectNumOfDefinedDomainsCheckACL,
conn);
-cleanup:
+ cleanup:
return ret;
}
@@ -6120,7 +6120,7 @@ qemuDomainObjStart(virConnectPtr conn,
}
}
-cleanup:
+ cleanup:
VIR_FREE(managed_save);
return ret;
}
@@ -6159,11 +6159,11 @@ qemuDomainCreateWithFlags(virDomainPtr dom, unsigned int flags)
ret = 0;
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virNWFilterUnlockFilterUpdates();
@@ -6257,7 +6257,7 @@ static virDomainPtr qemuDomainDefineXML(virConnectPtr conn, const
char *xml)
dom = virGetDomain(conn, vm->def->name, vm->def->uuid);
if (dom) dom->id = vm->def->id;
-cleanup:
+ cleanup:
virDomainDefFree(oldDef);
virDomainDefFree(def);
if (vm)
@@ -6354,7 +6354,7 @@ qemuDomainUndefineFlags(virDomainPtr dom,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(name);
if (vm)
virObjectUnlock(vm);
@@ -6600,7 +6600,7 @@ qemuDomainChangeDiskMediaLive(virConnectPtr conn,
VIR_WARN("Failed to teardown cgroup for disk path %s",
NULLSTR(virDomainDiskGetSource(disk)));
-end:
+ end:
virObjectUnref(caps);
virDomainDeviceDefFree(dev_copy);
return ret;
@@ -7064,11 +7064,11 @@ static int qemuDomainAttachDeviceFlags(virDomainPtr dom, const
char *xml,
}
}
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
virObjectUnref(qemuCaps);
virDomainDefFree(vmdef);
if (dev != dev_copy)
@@ -7210,11 +7210,11 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom,
}
}
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
virObjectUnref(qemuCaps);
virDomainDefFree(vmdef);
if (dev != dev_copy)
@@ -7351,11 +7351,11 @@ static int qemuDomainDetachDeviceFlags(virDomainPtr dom, const
char *xml,
}
}
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
virObjectUnref(qemuCaps);
virDomainDefFree(vmdef);
if (dev != dev_copy)
@@ -7389,7 +7389,7 @@ static int qemuDomainGetAutostart(virDomainPtr dom,
*autostart = vm->autostart;
ret = 0;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -7453,7 +7453,7 @@ static int qemuDomainSetAutostart(virDomainPtr dom,
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(configFile);
VIR_FREE(autostartLink);
if (vm)
@@ -7510,7 +7510,7 @@ static char *qemuDomainGetSchedulerType(virDomainPtr dom,
ignore_value(VIR_STRDUP(ret, "posix"));
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(cfg);
@@ -7607,11 +7607,11 @@ qemuDomainParseBlkioDeviceStr(char *blkioDeviceStr, const char
*type,
return 0;
-error:
+ error:
virReportError(VIR_ERR_INVALID_ARG,
_("unable to parse blkio device '%s'
'%s'"),
type, blkioDeviceStr);
-cleanup:
+ cleanup:
virBlkioDeviceArrayClear(result, ndevices);
VIR_FREE(result);
return -1;
@@ -7892,7 +7892,7 @@ qemuDomainSetBlkioParameters(virDomainPtr dom,
ret = -1;
}
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(caps);
@@ -8324,7 +8324,7 @@ qemuDomainGetBlkioParameters(virDomainPtr dom,
*nparams = QEMU_NB_BLKIO_PARAM;
ret = 0;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(caps);
@@ -8469,7 +8469,7 @@ qemuDomainSetMemoryParameters(virDomainPtr dom,
ret = 0;
-cleanup:
+ cleanup:
virObjectUnlock(vm);
virObjectUnref(caps);
virObjectUnref(cfg);
@@ -8615,12 +8615,12 @@ qemuDomainGetMemoryParameters(virDomainPtr dom,
}
}
-out:
+ out:
if (QEMU_NB_MEM_PARAM < *nparams)
*nparams = QEMU_NB_MEM_PARAM;
ret = 0;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(caps);
@@ -8826,7 +8826,7 @@ qemuDomainSetNumaParameters(virDomainPtr dom,
ret = 0;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(caps);
@@ -8928,7 +8928,7 @@ qemuDomainGetNumaParameters(virDomainPtr dom,
*nparams = QEMU_NB_NUMA_PARAM;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(nodeset);
if (vm)
virObjectUnlock(vm);
@@ -8965,7 +8965,7 @@ qemuSetVcpusBWLive(virDomainObjPtr vm, virCgroupPtr cgroup,
return 0;
-cleanup:
+ cleanup:
virCgroupFree(&cgroup_vcpu);
return -1;
}
@@ -8993,7 +8993,7 @@ qemuSetEmulatorBandwidthLive(virDomainObjPtr vm, virCgroupPtr
cgroup,
virCgroupFree(&cgroup_emulator);
return 0;
-cleanup:
+ cleanup:
virCgroupFree(&cgroup_emulator);
return -1;
}
@@ -9169,7 +9169,7 @@ qemuDomainSetSchedulerParametersFlags(virDomainPtr dom,
ret = 0;
-cleanup:
+ cleanup:
virDomainDefFree(vmdef);
if (vm)
virObjectUnlock(vm);
@@ -9232,10 +9232,10 @@ qemuGetVcpusBWLive(virDomainObjPtr vm,
if (rc < 0)
goto cleanup;
-out:
+ out:
ret = 0;
-cleanup:
+ cleanup:
virCgroupFree(&cgroup_vcpu);
return ret;
}
@@ -9267,7 +9267,7 @@ qemuGetEmulatorBandwidthLive(virDomainObjPtr vm, virCgroupPtr
cgroup,
ret = 0;
-cleanup:
+ cleanup:
virCgroupFree(&cgroup_emulator);
return ret;
}
@@ -9360,7 +9360,7 @@ qemuDomainGetSchedulerParametersFlags(virDomainPtr dom,
goto cleanup;
}
-out:
+ out:
if (virTypedParameterAssign(¶ms[0], VIR_DOMAIN_SCHEDULER_CPU_SHARES,
VIR_TYPED_PARAM_ULLONG, shares) < 0)
goto cleanup;
@@ -9406,7 +9406,7 @@ out:
ret = 0;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(caps);
@@ -9498,11 +9498,11 @@ qemuDomainBlockResize(virDomainPtr dom,
ret = 0;
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
VIR_FREE(device);
if (vm)
virObjectUnlock(vm);
@@ -9575,11 +9575,11 @@ qemuDomainBlockStats(virDomainPtr dom,
&stats->errs);
qemuDomainObjExitMonitor(driver, vm);
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -9749,11 +9749,11 @@ qemuDomainBlockStatsFlags(virDomainPtr dom,
ret = 0;
*nparams = tmp;
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -9796,7 +9796,7 @@ qemuDomainInterfaceStats(virDomainPtr dom,
virReportError(VIR_ERR_INVALID_ARG,
_("invalid path, '%s' is not a known
interface"), path);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -9979,7 +9979,7 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom,
}
ret = 0;
-cleanup:
+ cleanup:
virNetDevBandwidthFree(bandwidth);
virNetDevBandwidthFree(newBandwidth);
if (vm)
@@ -10101,7 +10101,7 @@ qemuDomainGetInterfaceParameters(virDomainPtr dom,
*nparams = QEMU_NB_BANDWIDTH_PARAM;
ret = 0;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(caps);
@@ -10155,7 +10155,7 @@ qemuDomainMemoryStats(virDomainPtr dom,
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -10212,7 +10212,7 @@ qemuDomainBlockPeek(virDomainPtr dom,
ret = 0;
-cleanup:
+ cleanup:
VIR_FORCE_CLOSE(fd);
if (vm)
virObjectUnlock(vm);
@@ -10294,11 +10294,11 @@ qemuDomainMemoryPeek(virDomainPtr dom,
ret = 0;
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
VIR_FORCE_CLOSE(fd);
if (tmp)
unlink(tmp);
@@ -10466,7 +10466,7 @@ qemuDomainGetBlockInfo(virDomainPtr dom,
ret = 0;
}
-cleanup:
+ cleanup:
VIR_FREE(alias);
virStorageFileFreeMetadata(meta);
VIR_FORCE_CLOSE(fd);
@@ -10505,7 +10505,7 @@ qemuConnectDomainEventRegister(virConnectPtr conn,
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
@@ -10527,7 +10527,7 @@ qemuConnectDomainEventDeregister(virConnectPtr conn,
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
@@ -10552,7 +10552,7 @@ qemuConnectDomainEventRegisterAny(virConnectPtr conn,
callback, opaque, freecb, &ret) < 0)
ret = -1;
-cleanup:
+ cleanup:
return ret;
}
@@ -10574,7 +10574,7 @@ qemuConnectDomainEventDeregisterAny(virConnectPtr conn,
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
@@ -10626,7 +10626,7 @@ qemuDomainMigratePrepareTunnel(virConnectPtr dconn,
NULL, 0, NULL, NULL, /* No cookies in v2 */
st, &def, origname, flags);
-cleanup:
+ cleanup:
VIR_FREE(origname);
virDomainDefFree(def);
return ret;
@@ -10686,7 +10686,7 @@ qemuDomainMigratePrepare2(virConnectPtr dconn,
uri_in, uri_out,
&def, origname, NULL, flags);
-cleanup:
+ cleanup:
VIR_FREE(origname);
virDomainDefFree(def);
return ret;
@@ -10740,7 +10740,7 @@ qemuDomainMigratePerform(virDomainPtr dom,
NULL, NULL, /* No output cookies in v2 */
flags, dname, resource, false);
-cleanup:
+ cleanup:
return ret;
}
@@ -10779,7 +10779,7 @@ qemuDomainMigrateFinish2(virConnectPtr dconn,
NULL, 0, NULL, NULL, /* No cookies */
flags, retcode, false);
-cleanup:
+ cleanup:
return dom;
}
@@ -10892,7 +10892,7 @@ qemuDomainMigratePrepare3(virConnectPtr dconn,
uri_in, uri_out,
&def, origname, NULL, flags);
-cleanup:
+ cleanup:
VIR_FREE(origname);
virDomainDefFree(def);
return ret;
@@ -10959,7 +10959,7 @@ qemuDomainMigratePrepare3Params(virConnectPtr dconn,
uri_in, uri_out,
&def, origname, listenAddress, flags);
-cleanup:
+ cleanup:
VIR_FREE(origname);
virDomainDefFree(def);
virObjectUnref(cfg);
@@ -11003,7 +11003,7 @@ qemuDomainMigratePrepareTunnel3(virConnectPtr dconn,
cookieout, cookieoutlen,
st, &def, origname, flags);
-cleanup:
+ cleanup:
VIR_FREE(origname);
virDomainDefFree(def);
return ret;
@@ -11056,7 +11056,7 @@ qemuDomainMigratePrepareTunnel3Params(virConnectPtr dconn,
cookieout, cookieoutlen,
st, &def, origname, flags);
-cleanup:
+ cleanup:
VIR_FREE(origname);
virDomainDefFree(def);
return ret;
@@ -11317,7 +11317,7 @@ qemuNodeDeviceGetPCIInfo(virNodeDeviceDefPtr def,
}
ret = 0;
-out:
+ out:
return ret;
}
@@ -11394,7 +11394,7 @@ qemuNodeDeviceDetachFlags(virNodeDevicePtr dev,
}
ret = virHostdevPCINodeDeviceDetach(hostdev_mgr, pci);
-cleanup:
+ cleanup:
virPCIDeviceFree(pci);
virNodeDeviceDefFree(def);
VIR_FREE(xml);
@@ -11439,7 +11439,7 @@ qemuNodeDeviceReAttach(virNodeDevicePtr dev)
ret = virHostdevPCINodeDeviceReAttach(hostdev_mgr, pci);
virPCIDeviceFree(pci);
-cleanup:
+ cleanup:
virNodeDeviceDefFree(def);
VIR_FREE(xml);
return ret;
@@ -11477,7 +11477,7 @@ qemuNodeDeviceReset(virNodeDevicePtr dev)
ret = virHostdevPCINodeDeviceReset(hostdev_mgr, pci);
virPCIDeviceFree(pci);
-cleanup:
+ cleanup:
virNodeDeviceDefFree(def);
VIR_FREE(xml);
return ret;
@@ -11508,7 +11508,7 @@ qemuConnectCompareCPU(virConnectPtr conn,
ret = cpuCompareXML(caps->host.cpu, xmlDesc);
}
-cleanup:
+ cleanup:
virObjectUnref(caps);
return ret;
}
@@ -11529,7 +11529,7 @@ qemuConnectBaselineCPU(virConnectPtr conn ATTRIBUTE_UNUSED,
cpu = cpuBaselineXML(xmlCPUs, ncpus, NULL, 0, flags);
-cleanup:
+ cleanup:
return cpu;
}
@@ -11573,7 +11573,7 @@ static int qemuDomainGetJobInfo(virDomainPtr dom,
ret = 0;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -11714,7 +11714,7 @@ qemuDomainGetJobStats(virDomainPtr dom,
*nparams = npar;
ret = 0;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
if (ret < 0)
@@ -11764,11 +11764,11 @@ static int qemuDomainAbortJob(virDomainPtr dom)
ret = qemuMonitorMigrateCancel(priv->mon);
qemuDomainObjExitMonitor(driver, vm);
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -11815,11 +11815,11 @@ qemuDomainMigrateSetMaxDowntime(virDomainPtr dom,
ret = qemuMonitorSetMigrationDowntime(priv->mon, downtime);
qemuDomainObjExitMonitor(driver, vm);
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -11870,11 +11870,11 @@ qemuDomainMigrateGetCompressionCache(virDomainPtr dom,
qemuDomainObjExitMonitor(driver, vm);
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -11926,11 +11926,11 @@ qemuDomainMigrateSetCompressionCache(virDomainPtr dom,
qemuDomainObjExitMonitor(driver, vm);
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -11974,7 +11974,7 @@ qemuDomainMigrateSetMaxSpeed(virDomainPtr dom,
if (ret == 0)
priv->migMaxBandwidth = bandwidth;
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
} else {
@@ -11982,7 +11982,7 @@ endjob:
ret = 0;
}
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -12010,7 +12010,7 @@ qemuDomainMigrateGetMaxSpeed(virDomainPtr dom,
*bandwidth = priv->migMaxBandwidth;
ret = 0;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -12086,7 +12086,7 @@ qemuDomainPrepareDiskChainElement(virQEMUDriverPtr driver,
ret = 0;
-cleanup:
+ cleanup:
disk->src.path = origsrc;
disk->src.format = origformat;
disk->backingChain = origchain;
@@ -12235,7 +12235,7 @@ qemuDomainSnapshotCreateInactiveExternal(virQEMUDriverPtr driver,
ret = 0;
-cleanup:
+ cleanup:
virCommandFree(cmd);
/* unlink images if creation has failed */
@@ -12313,7 +12313,7 @@ qemuDomainSnapshotCreateActiveInternal(virConnectPtr conn,
vm = NULL;
}
-cleanup:
+ cleanup:
if (resume && virDomainObjIsActive(vm) &&
qemuProcessStartCPUs(driver, vm, conn,
VIR_DOMAIN_RUNNING_UNPAUSED,
@@ -12327,7 +12327,7 @@ cleanup:
}
}
-endjob:
+ endjob:
if (vm && !qemuDomainObjEndJob(driver, vm)) {
/* Only possible if a transient vm quit while our locks were down,
* in which case we don't want to save snapshot metadata. */
@@ -12529,7 +12529,7 @@ qemuDomainSnapshotPrepareDiskExternal(virConnectPtr conn,
ret = 0;
-cleanup:
+ cleanup:
virStorageFileFree(snapfile);
return ret;
}
@@ -12725,7 +12725,7 @@ qemuDomainSnapshotPrepare(virConnectPtr conn,
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
@@ -12894,7 +12894,7 @@ qemuDomainSnapshotCreateSingleDiskActive(virQEMUDriverPtr driver,
persistHosts = NULL;
}
-cleanup:
+ cleanup:
if (need_unlink && virStorageFileUnlink(snapfile))
VIR_WARN("unable to unlink just-created %s", source);
virStorageFileFree(snapfile);
@@ -12961,7 +12961,7 @@ qemuDomainSnapshotUndoSingleDiskActive(virQEMUDriverPtr driver,
origdisk->src.hosts);
}
-cleanup:
+ cleanup:
virStorageFileFree(diskfile);
VIR_FREE(source);
VIR_FREE(persistSource);
@@ -13072,7 +13072,7 @@ qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver,
}
}
-cleanup:
+ cleanup:
if (ret == 0 || !virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_TRANSACTION)) {
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0 ||
@@ -13241,7 +13241,7 @@ qemuDomainSnapshotCreateActiveExternal(virConnectPtr conn,
ret = 0;
-endjob:
+ endjob:
if (resume && vm && virDomainObjIsActive(vm) &&
qemuProcessStartCPUs(driver, vm, conn,
VIR_DOMAIN_RUNNING_UNPAUSED,
@@ -13274,7 +13274,7 @@ endjob:
ret = -1;
}
-cleanup:
+ cleanup:
VIR_FREE(xml);
virObjectUnref(cfg);
if (memory_unlink && ret < 0)
@@ -13494,7 +13494,7 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
*/
snapshot = virGetDomainSnapshot(domain, snap->def->name);
-cleanup:
+ cleanup:
if (vm) {
if (snapshot && !(flags & VIR_DOMAIN_SNAPSHOT_CREATE_NO_METADATA)) {
if (qemuDomainSnapshotWriteMetadata(vm, snap,
@@ -13548,7 +13548,7 @@ static int qemuDomainSnapshotListNames(virDomainPtr domain, char
**names,
n = virDomainSnapshotObjListGetNames(vm->snapshots, NULL, names, nameslen,
flags);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return n;
@@ -13571,7 +13571,7 @@ static int qemuDomainSnapshotNum(virDomainPtr domain,
n = virDomainSnapshotObjListNum(vm->snapshots, NULL, flags);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return n;
@@ -13595,7 +13595,7 @@ qemuDomainListAllSnapshots(virDomainPtr domain,
virDomainSnapshotPtr **snaps,
n = virDomainListSnapshots(vm->snapshots, NULL, domain, snaps, flags);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return n;
@@ -13626,7 +13626,7 @@ qemuDomainSnapshotListChildrenNames(virDomainSnapshotPtr
snapshot,
n = virDomainSnapshotObjListGetNames(vm->snapshots, snap, names, nameslen,
flags);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return n;
@@ -13654,7 +13654,7 @@ qemuDomainSnapshotNumChildren(virDomainSnapshotPtr snapshot,
n = virDomainSnapshotObjListNum(vm->snapshots, snap, flags);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return n;
@@ -13684,7 +13684,7 @@ qemuDomainSnapshotListAllChildren(virDomainSnapshotPtr snapshot,
n = virDomainListSnapshots(vm->snapshots, snap, snapshot->domain, snaps,
flags);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return n;
@@ -13711,7 +13711,7 @@ static virDomainSnapshotPtr
qemuDomainSnapshotLookupByName(virDomainPtr domain,
snapshot = virGetDomainSnapshot(domain, snap->def->name);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return snapshot;
@@ -13733,7 +13733,7 @@ static int qemuDomainHasCurrentSnapshot(virDomainPtr domain,
ret = (vm->current_snapshot != NULL);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -13767,7 +13767,7 @@ qemuDomainSnapshotGetParent(virDomainSnapshotPtr snapshot,
parent = virGetDomainSnapshot(snapshot->domain, snap->def->parent);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return parent;
@@ -13795,7 +13795,7 @@ static virDomainSnapshotPtr qemuDomainSnapshotCurrent(virDomainPtr
domain,
snapshot = virGetDomainSnapshot(domain, vm->current_snapshot->def->name);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return snapshot;
@@ -13824,7 +13824,7 @@ static char *qemuDomainSnapshotGetXMLDesc(virDomainSnapshotPtr
snapshot,
xml = virDomainSnapshotDefFormat(uuidstr, snap->def, flags, 0);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return xml;
@@ -13852,7 +13852,7 @@ qemuDomainSnapshotIsCurrent(virDomainSnapshotPtr snapshot,
ret = (vm->current_snapshot &&
STREQ(snapshot->name, vm->current_snapshot->def->name));
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -13883,7 +13883,7 @@ qemuDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot,
* that, then we would have a reason to return 0 here. */
ret = 1;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -14214,11 +14214,11 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr
snapshot,
ret = 0;
-endjob:
+ endjob:
if (vm && !qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm && ret == 0) {
if (qemuDomainSnapshotWriteMetadata(vm, snap,
cfg->snapshotDir) < 0)
@@ -14380,11 +14380,11 @@ static int qemuDomainSnapshotDelete(virDomainSnapshotPtr
snapshot,
ret = qemuDomainSnapshotDiscard(driver, vm, snap, true, metadata_only);
}
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(cfg);
@@ -14433,12 +14433,12 @@ static int qemuDomainQemuMonitorCommand(virDomainPtr domain,
const char *cmd,
ret = qemuMonitorArbitraryCommand(priv->mon, cmd, result, hmp);
qemuDomainObjExitMonitor(driver, vm);
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm)) {
vm = NULL;
}
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -14532,7 +14532,7 @@ static virDomainPtr qemuDomainQemuAttach(virConnectPtr conn,
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
virDomainDefFree(def);
virDomainChrSourceDefFree(monConfig);
if (vm)
@@ -14620,7 +14620,7 @@ qemuDomainOpenConsole(virDomainPtr dom,
ret = -1;
}
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -14695,7 +14695,7 @@ qemuDomainOpenChannel(virDomainPtr dom,
ret = -1;
}
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -14721,7 +14721,7 @@ qemuDiskPathToAlias(virDomainObjPtr vm, const char *path, int
*idxret)
return NULL;
}
-cleanup:
+ cleanup:
if (!ret) {
virReportError(VIR_ERR_INVALID_ARG,
"%s", _("No device found for specified
path"));
@@ -14859,7 +14859,7 @@ qemuDomainBlockPivot(virConnectPtr conn,
disk->mirrorFormat = VIR_STORAGE_FILE_NONE;
disk->mirroring = false;
-cleanup:
+ cleanup:
if (resume && virDomainObjIsActive(vm) &&
qemuProcessStartCPUs(driver, vm, conn,
VIR_DOMAIN_RUNNING_UNPAUSED,
@@ -15023,13 +15023,13 @@ qemuDomainBlockJobImpl(virDomainObjPtr vm,
}
}
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm)) {
vm = NULL;
goto cleanup;
}
-cleanup:
+ cleanup:
VIR_FREE(device);
if (vm)
virObjectUnlock(vm);
@@ -15244,7 +15244,7 @@ qemuDomainBlockCopy(virDomainObjPtr vm,
disk->mirror = mirror;
mirror = NULL;
-endjob:
+ endjob:
if (need_unlink && unlink(dest))
VIR_WARN("unable to unlink just-created %s", dest);
if (ret < 0 && disk)
@@ -15253,7 +15253,7 @@ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
VIR_FREE(device);
if (vm)
virObjectUnlock(vm);
@@ -15435,7 +15435,7 @@ qemuDomainBlockCommit(virDomainPtr dom, const char *path, const
char *base,
base ? base : base_canon, bandwidth);
qemuDomainObjExitMonitor(driver, vm);
-endjob:
+ endjob:
if (ret < 0 && clean_access) {
/* Revert access to read-only, if possible. */
qemuDomainPrepareDiskChainElement(driver, vm, disk, base_canon,
@@ -15448,7 +15448,7 @@ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
VIR_FREE(device);
if (vm)
virObjectUnlock(vm);
@@ -15515,7 +15515,7 @@ qemuDomainOpenGraphics(virDomainPtr dom,
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -15693,11 +15693,11 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
}
}
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
VIR_FREE(device);
if (vm)
virObjectUnlock(vm);
@@ -15837,11 +15837,11 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
*nparams = QEMU_NB_BLOCK_IO_TUNE_PARAM;
ret = 0;
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
VIR_FREE(device);
if (vm)
virObjectUnlock(vm);
@@ -15912,11 +15912,11 @@ qemuDomainGetDiskErrors(virDomainPtr dom,
ret = n;
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virHashFree(table);
@@ -15958,7 +15958,7 @@ qemuDomainSetMetadata(virDomainPtr dom,
ret = virDomainObjSetMetadata(vm, type, metadata, key, uri, caps,
driver->xmlopt, cfg->configDir, flags);
-cleanup:
+ cleanup:
virObjectUnlock(vm);
virObjectUnref(caps);
virObjectUnref(cfg);
@@ -15987,7 +15987,7 @@ qemuDomainGetMetadata(virDomainPtr dom,
ret = virDomainObjGetMetadata(vm, type, uri, caps, driver->xmlopt, flags);
-cleanup:
+ cleanup:
virObjectUnlock(vm);
virObjectUnref(caps);
return ret;
@@ -16044,7 +16044,7 @@ getSumVcpuPercpuStats(virDomainObjPtr vm,
}
ret = 0;
-cleanup:
+ cleanup:
virCgroupFree(&group_vcpu);
VIR_FREE(buf);
return ret;
@@ -16146,7 +16146,7 @@ qemuDomainGetPercpuStats(virDomainObjPtr vm,
}
rv = param_idx + 1;
-cleanup:
+ cleanup:
VIR_FREE(sum_cpu_time);
VIR_FREE(buf);
return rv;
@@ -16195,7 +16195,7 @@ qemuDomainGetCPUStats(virDomainPtr domain,
else
ret = qemuDomainGetPercpuStats(vm, params, nparams,
start_cpu, ncpus);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -16285,11 +16285,11 @@ qemuDomainPMSuspendForDuration(virDomainPtr dom,
ret = qemuAgentSuspend(priv->agent, target);
qemuDomainObjExitAgent(vm);
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -16334,11 +16334,11 @@ qemuDomainPMWakeup(virDomainPtr dom,
ret = qemuMonitorSystemWakeup(priv->mon);
qemuDomainObjExitMonitor(driver, vm);
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
@@ -16360,7 +16360,7 @@ qemuConnectListAllDomains(virConnectPtr conn,
ret = virDomainObjListExport(driver->domains, conn, domains,
virConnectListAllDomainsCheckACL, flags);
-cleanup:
+ cleanup:
return ret;
}
@@ -16410,11 +16410,11 @@ qemuDomainQemuAgentCommand(virDomainPtr domain,
if (ret < 0)
VIR_FREE(result);
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return result;
@@ -16443,7 +16443,7 @@ qemuConnectDomainQemuMonitorEventRegister(virConnectPtr conn,
&ret) < 0)
ret = -1;
-cleanup:
+ cleanup:
return ret;
}
@@ -16464,7 +16464,7 @@ qemuConnectDomainQemuMonitorEventDeregister(virConnectPtr conn,
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
@@ -16519,11 +16519,11 @@ qemuDomainFSTrim(virDomainPtr dom,
ret = qemuAgentFSTrim(priv->agent, minimum);
qemuDomainObjExitAgent(vm);
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c
index cdd4137..c5ba003 100644
--- a/src/qemu/qemu_hostdev.c
+++ b/src/qemu/qemu_hostdev.c
@@ -114,7 +114,7 @@ qemuHostdevHostSupportsPassthroughVFIO(void)
ret = true;
-cleanup:
+ cleanup:
if (iommuDir)
closedir(iommuDir);
@@ -140,7 +140,7 @@ qemuHostdevHostSupportsPassthroughLegacy(void)
ret = true;
# endif
-cleanup:
+ cleanup:
VIR_FORCE_CLOSE(kvmfd);
return ret;
@@ -235,7 +235,7 @@ qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
ret = virHostdevPreparePCIDevices(hostdev_mgr, QEMU_DRIVER_NAME,
name, uuid, hostdevs,
nhostdevs, flags);
-out:
+ out:
return ret;
}
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index b948f2c..19d96cb 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -153,7 +153,7 @@ int qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
src, format);
qemuDomainObjExitMonitor(driver, vm);
}
-audit:
+ audit:
if (src)
virDomainAuditDisk(vm, virDomainDiskGetSource(origdisk),
src, "update", ret >= 0);
@@ -176,12 +176,12 @@ audit:
virDomainDiskDefFree(disk);
-cleanup:
+ cleanup:
VIR_FREE(driveAlias);
virObjectUnref(cfg);
return ret;
-error:
+ error:
if (virSecurityManagerRestoreImageLabel(driver->securityManager,
vm->def, disk) < 0)
VIR_WARN("Unable to restore security label on new media %s", src);
@@ -229,7 +229,7 @@ qemuDomainCheckEjectableMedia(virQEMUDriverPtr driver,
ret = 0;
-cleanup:
+ cleanup:
virHashFree(table);
return ret;
}
@@ -337,13 +337,13 @@ qemuDomainAttachVirtioDiskDevice(virConnectPtr conn,
virDomainDiskInsertPreAlloced(vm->def, disk);
-cleanup:
+ cleanup:
VIR_FREE(devstr);
VIR_FREE(drivestr);
virObjectUnref(cfg);
return ret;
-error:
+ error:
if (releaseaddr)
qemuDomainReleaseDeviceAddress(vm, &disk->info, src);
@@ -429,7 +429,7 @@ int qemuDomainAttachControllerDevice(virQEMUDriverPtr driver,
virDomainControllerInsertPreAlloced(vm->def, controller);
}
-cleanup:
+ cleanup:
if (ret != 0 && releaseaddr)
qemuDomainReleaseDeviceAddress(vm, &controller->info, NULL);
@@ -590,13 +590,13 @@ qemuDomainAttachSCSIDisk(virConnectPtr conn,
virDomainDiskInsertPreAlloced(vm->def, disk);
-cleanup:
+ cleanup:
VIR_FREE(devstr);
VIR_FREE(drivestr);
virObjectUnref(cfg);
return ret;
-error:
+ error:
if (virSecurityManagerRestoreImageLabel(driver->securityManager,
vm->def, disk) < 0)
VIR_WARN("Unable to restore security label on %s", src);
@@ -684,13 +684,13 @@ qemuDomainAttachUSBMassstorageDevice(virConnectPtr conn,
virDomainDiskInsertPreAlloced(vm->def, disk);
-cleanup:
+ cleanup:
VIR_FREE(devstr);
VIR_FREE(drivestr);
virObjectUnref(cfg);
return ret;
-error:
+ error:
if (virSecurityManagerRestoreImageLabel(driver->securityManager,
vm->def, disk) < 0)
VIR_WARN("Unable to restore security label on %s", src);
@@ -809,7 +809,7 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
NULLSTR(src));
}
-end:
+ end:
if (ret != 0)
ignore_value(qemuRemoveSharedDevice(driver, dev, vm->def->name));
virObjectUnref(caps);
@@ -1076,7 +1076,7 @@ int qemuDomainAttachNetDevice(virConnectPtr conn,
ret = 0;
-cleanup:
+ cleanup:
if (!ret) {
vm->def->nets[vm->def->nnets++] = net;
} else {
@@ -1127,7 +1127,7 @@ cleanup:
return ret;
-try_remove:
+ try_remove:
if (!virDomainObjIsActive(vm))
goto cleanup;
@@ -1282,7 +1282,7 @@ qemuDomainAttachHostPCIDevice(virQEMUDriverPtr driver,
return 0;
-error:
+ error:
if (teardowncgroup && qemuTeardownHostdevCgroup(vm, hostdev) < 0)
VIR_WARN("Unable to remove host device cgroup ACL on hotplug fail");
if (teardownlabel &&
@@ -1299,7 +1299,7 @@ error:
VIR_FREE(configfd_name);
VIR_FORCE_CLOSE(configfd);
-cleanup:
+ cleanup:
virObjectUnref(cfg);
return -1;
}
@@ -1341,7 +1341,7 @@ int qemuDomainAttachRedirdevDevice(virQEMUDriverPtr driver,
return 0;
-error:
+ error:
VIR_FREE(devstr);
return -1;
@@ -1467,7 +1467,7 @@ int qemuDomainAttachChrDevice(virQEMUDriverPtr driver,
qemuDomainObjExitMonitor(driver, vm);
ret = 0;
-cleanup:
+ cleanup:
if (ret < 0 && need_remove)
qemuDomainChrRemove(vmdef, chr);
VIR_FREE(charAlias);
@@ -1526,7 +1526,7 @@ qemuDomainAttachHostUSBDevice(virQEMUDriverPtr driver,
vm->def->hostdevs[vm->def->nhostdevs++] = hostdev;
ret = 0;
-cleanup:
+ cleanup:
if (ret < 0) {
if (teardowncgroup && qemuTeardownHostdevCgroup(vm, hostdev) < 0)
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;
ret = 0;
-cleanup:
+ cleanup:
if (ret < 0) {
qemuDomainReAttachHostSCSIDevices(driver, vm->def->name, &hostdev, 1);
if (teardowncgroup && qemuTeardownHostdevCgroup(vm, hostdev) < 0)
@@ -1676,7 +1676,7 @@ int qemuDomainAttachHostDevice(virQEMUDriverPtr driver,
return 0;
-error:
+ error:
return -1;
}
@@ -1742,7 +1742,7 @@ qemuDomainNetGetBridgeName(virConnectPtr conn, virDomainNetDefPtr
net)
virDomainNetGetActualType(net));
}
-cleanup:
+ cleanup:
return brname;
}
@@ -1797,7 +1797,7 @@ qemuDomainChangeNetBridge(virConnectPtr conn,
}
/* caller will replace entire olddev with newdev in domain nets list */
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(oldbridge);
VIR_FREE(newbridge);
return ret;
@@ -1865,7 +1865,7 @@ int qemuDomainChangeNetLinkState(virQEMUDriverPtr driver,
/* modify the device configuration */
dev->linkstate = linkstate;
-cleanup:
+ cleanup:
qemuDomainObjExitMonitor(driver, vm);
return ret;
@@ -2226,7 +2226,7 @@ qemuDomainChangeNet(virQEMUDriverPtr driver,
}
ret = 0;
-cleanup:
+ cleanup:
/* 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
@@ -2430,7 +2430,7 @@ qemuDomainChangeGraphics(virQEMUDriverPtr driver,
break;
}
-cleanup:
+ cleanup:
virObjectUnref(cfg);
return ret;
}
@@ -2894,7 +2894,7 @@ qemuDomainDetachVirtioDiskDevice(virQEMUDriverPtr driver,
qemuDomainRemoveDiskDevice(driver, vm, detach);
ret = 0;
-cleanup:
+ cleanup:
qemuDomainResetDeviceRemoval(vm);
VIR_FREE(drivestr);
return ret;
@@ -2948,7 +2948,7 @@ qemuDomainDetachDiskDevice(virQEMUDriverPtr driver,
qemuDomainRemoveDiskDevice(driver, vm, detach);
ret = 0;
-cleanup:
+ cleanup:
qemuDomainResetDeviceRemoval(vm);
VIR_FREE(drivestr);
return ret;
@@ -3134,7 +3134,7 @@ int qemuDomainDetachControllerDevice(virQEMUDriverPtr driver,
ret = 0;
-cleanup:
+ cleanup:
qemuDomainResetDeviceRemoval(vm);
return ret;
}
@@ -3251,7 +3251,7 @@ qemuDomainDetachHostSCSIDevice(virQEMUDriverPtr driver,
}
qemuDomainObjExitMonitor(driver, vm);
-cleanup:
+ cleanup:
VIR_FREE(drvstr);
VIR_FREE(devstr);
return ret;
@@ -3457,7 +3457,7 @@ qemuDomainDetachNetDevice(virQEMUDriverPtr driver,
ret = 0;
-cleanup:
+ cleanup:
qemuDomainResetDeviceRemoval(vm);
VIR_FREE(hostnet_name);
return ret;
@@ -3527,9 +3527,9 @@ qemuDomainChangeGraphicsPasswords(virQEMUDriverPtr driver,
}
}
-end_job:
+ end_job:
qemuDomainObjExitMonitor(driver, vm);
-cleanup:
+ cleanup:
virObjectUnref(cfg);
return ret;
}
@@ -3553,7 +3553,7 @@ int qemuDomainAttachLease(virQEMUDriverPtr driver,
virDomainLeaseInsertPreAlloced(vm->def, lease);
ret = 0;
-cleanup:
+ cleanup:
virObjectUnref(cfg);
return ret;
}
@@ -3621,7 +3621,7 @@ int qemuDomainDetachChrDevice(virQEMUDriverPtr driver,
qemuDomainRemoveChrDevice(driver, vm, tmpChr);
ret = 0;
-cleanup:
+ cleanup:
qemuDomainResetDeviceRemoval(vm);
VIR_FREE(devstr);
VIR_FREE(charAlias);
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index fc8ff3d..4732b64 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -268,7 +268,7 @@ qemuDomainExtractTLSSubject(const char *certdir)
return subject;
-error:
+ error:
VIR_FREE(certfile);
VIR_FREE(pemdata);
return NULL;
@@ -320,7 +320,7 @@ qemuMigrationCookieGraphicsAlloc(virQEMUDriverPtr driver,
virObjectUnref(cfg);
return mig;
-error:
+ error:
qemuMigrationCookieGraphicsFree(mig);
virObjectUnref(cfg);
return NULL;
@@ -373,7 +373,7 @@ qemuMigrationCookieNetworkAlloc(virQEMUDriverPtr driver
ATTRIBUTE_UNUSED,
}
return mig;
-error:
+ error:
qemuMigrationCookieNetworkFree(mig);
return NULL;
}
@@ -406,7 +406,7 @@ qemuMigrationCookieNew(virDomainObjPtr dom)
return mig;
-error:
+ error:
qemuMigrationCookieFree(mig);
return NULL;
}
@@ -719,7 +719,7 @@ qemuMigrationCookieGraphicsXMLParse(xmlXPathContextPtr ctxt)
return grap;
-error:
+ error:
qemuMigrationCookieGraphicsFree(grap);
return NULL;
}
@@ -763,11 +763,11 @@ qemuMigrationCookieNetworkXMLParse(xmlXPathContextPtr ctxt)
VIR_FREE(interfaces);
-cleanup:
+ cleanup:
ctxt->node = save_ctxt;
return optr;
-error:
+ error:
VIR_FREE(interfaces);
qemuMigrationCookieNetworkFree(optr);
optr = NULL;
@@ -953,7 +953,7 @@ qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig,
virObjectUnref(caps);
return 0;
-error:
+ error:
VIR_FREE(tmp);
VIR_FREE(nodes);
virObjectUnref(caps);
@@ -978,7 +978,7 @@ qemuMigrationCookieXMLParseStr(qemuMigrationCookiePtr mig,
ret = qemuMigrationCookieXMLParse(mig, driver, doc, ctxt, flags);
-cleanup:
+ cleanup:
xmlXPathFreeContext(ctxt);
xmlFreeDoc(doc);
@@ -1080,7 +1080,7 @@ qemuMigrationEatCookie(virQEMUDriverPtr driver,
return mig;
-error:
+ error:
qemuMigrationCookieFree(mig);
return NULL;
}
@@ -1188,7 +1188,7 @@ qemuMigrationStartNBDServer(virQEMUDriverPtr driver,
priv->nbdPort = port;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(diskAlias);
if (ret < 0)
virPortAllocatorRelease(driver->remotePorts, port);
@@ -1337,13 +1337,13 @@ qemuMigrationDriveMirror(virQEMUDriverPtr driver,
QEMU_MONITOR_MIGRATE_NON_SHARED_INC);
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(diskAlias);
VIR_FREE(nbd_dest);
VIR_FREE(hoststr);
return ret;
-error:
+ error:
/* don't overwrite any errors */
err = virSaveLastError();
/* cancel any outstanding jobs */
@@ -1432,7 +1432,7 @@ qemuMigrationCancelDriveMirror(qemuMigrationCookiePtr mig,
qemuDomainObjExitMonitor(driver, vm);
}
-cleanup:
+ cleanup:
VIR_FREE(diskAlias);
return;
}
@@ -1617,7 +1617,7 @@ qemuMigrationSetCompression(virQEMUDriverPtr driver,
priv->mon,
QEMU_MONITOR_MIGRATION_CAPS_XBZRLE);
-cleanup:
+ cleanup:
qemuDomainObjExitMonitor(driver, vm);
return ret;
}
@@ -1651,7 +1651,7 @@ qemuMigrationSetAutoConverge(virQEMUDriverPtr driver,
priv->mon,
QEMU_MONITOR_MIGRATION_CAPS_AUTO_CONVERGE);
-cleanup:
+ cleanup:
qemuDomainObjExitMonitor(driver, vm);
return ret;
}
@@ -1834,13 +1834,13 @@ qemuMigrationWaitForCompletion(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virObjectLock(vm);
}
-cleanup:
+ cleanup:
if (priv->job.info.type == VIR_DOMAIN_JOB_COMPLETED)
return 0;
else
return -1;
-cancel:
+ cancel:
if (virDomainObjIsActive(vm)) {
if (qemuDomainObjEnterMonitorAsync(driver, vm,
priv->job.asyncJob) == 0) {
@@ -1938,7 +1938,7 @@ qemuDomainMigrateGraphicsRelocate(virQEMUDriverPtr driver,
qemuDomainObjExitMonitor(driver, vm);
}
-cleanup:
+ cleanup:
virURIFree(uri);
return ret;
}
@@ -1976,7 +1976,7 @@ qemuDomainMigrateOPDRelocate(virQEMUDriverPtr driver
ATTRIBUTE_UNUSED,
}
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
@@ -2039,7 +2039,7 @@ qemuMigrationCleanup(virDomainObjPtr vm,
;
}
-cleanup:
+ cleanup:
return vm;
}
@@ -2138,7 +2138,7 @@ static char
rv = qemuDomainDefFormatLive(driver, vm->def, false, true);
}
-cleanup:
+ cleanup:
qemuMigrationCookieFree(mig);
virObjectUnref(caps);
virDomainDefFree(def);
@@ -2208,12 +2208,12 @@ qemuMigrationBegin(virConnectPtr conn,
goto endjob;
}
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return xml;
-endjob:
+ endjob:
if ((flags & VIR_MIGRATE_CHANGE_PROTECTION)) {
if (qemuMigrationJobFinish(driver, vm) == 0)
vm = NULL;
@@ -2497,7 +2497,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
VIR_DEBUG("Received no lockstate");
}
-done:
+ done:
if (flags & VIR_MIGRATE_OFFLINE)
cookieFlags = 0;
else
@@ -2547,7 +2547,7 @@ done:
priv->migrationPort = port;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(migrateFrom);
VIR_FREE(xmlout);
VIR_FORCE_CLOSE(dataFD[0]);
@@ -2568,11 +2568,11 @@ cleanup:
virObjectUnref(caps);
return ret;
-stop:
+ stop:
virDomainAuditStart(vm, "migrated", false);
qemuProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_FAILED, 0);
-endjob:
+ endjob:
if (!qemuMigrationJobFinish(driver, vm)) {
vm = NULL;
}
@@ -2743,7 +2743,7 @@ qemuMigrationPrepareDirect(virQEMUDriverPtr driver,
ret = qemuMigrationPrepareAny(driver, dconn, cookiein, cookieinlen,
cookieout, cookieoutlen, def, origname,
NULL, port, autoPort, listenAddress, flags);
-cleanup:
+ cleanup:
virURIFree(uri);
VIR_FREE(hostname);
if (ret != 0) {
@@ -2787,7 +2787,7 @@ qemuMigrationPrepareDef(virQEMUDriverPtr driver,
}
}
-cleanup:
+ cleanup:
virObjectUnref(caps);
if (def && origname)
*origname = name;
@@ -2861,11 +2861,11 @@ qemuMigrationConfirmPhase(virQEMUDriverPtr driver,
}
}
-done:
+ done:
qemuMigrationCookieFree(mig);
rv = 0;
-cleanup:
+ cleanup:
if (event)
qemuDomainEventQueue(driver, event);
virObjectUnref(cfg);
@@ -2913,7 +2913,7 @@ qemuMigrationConfirm(virConnectPtr conn,
vm = NULL;
}
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
virObjectUnref(cfg);
@@ -3058,7 +3058,7 @@ static void qemuMigrationIOFunc(void *arg)
return;
-abrt:
+ abrt:
err = virSaveLastError();
if (err && err->code == VIR_ERR_OK) {
virFreeError(err);
@@ -3070,7 +3070,7 @@ abrt:
virFreeError(err);
}
-error:
+ error:
virCopyLastError(&data->err);
virResetLastError();
VIR_FREE(buffer);
@@ -3108,7 +3108,7 @@ qemuMigrationStartTunnel(virStreamPtr st,
return io;
-error:
+ error:
VIR_FORCE_CLOSE(wakeupFD[0]);
VIR_FORCE_CLOSE(wakeupFD[1]);
VIR_FREE(io);
@@ -3142,7 +3142,7 @@ qemuMigrationStopTunnel(qemuMigrationIOThreadPtr io, bool error)
rv = 0;
-cleanup:
+ cleanup:
VIR_FORCE_CLOSE(io->wakeupSendFD);
VIR_FORCE_CLOSE(io->wakeupRecvFD);
VIR_FREE(io);
@@ -3185,7 +3185,7 @@ qemuMigrationConnect(virQEMUDriverPtr driver,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(port);
if (ret < 0)
VIR_FORCE_CLOSE(spec->dest.fd.qemu);
@@ -3391,7 +3391,7 @@ qemuMigrationRun(virQEMUDriverPtr driver,
ret = 0;
-cleanup:
+ cleanup:
if (ret < 0 && !orig_err)
orig_err = virSaveLastError();
@@ -3422,7 +3422,7 @@ cleanup:
return ret;
-cancel:
+ cancel:
orig_err = virSaveLastError();
if (virDomainObjIsActive(vm)) {
@@ -3574,7 +3574,7 @@ static int doTunnelMigrate(virQEMUDriverPtr driver,
cookieoutlen, flags, resource, &spec, dconn,
graphicsuri);
-cleanup:
+ cleanup:
if (spec.destType == MIGRATION_DEST_FD) {
VIR_FORCE_CLOSE(spec.dest.fd.qemu);
VIR_FORCE_CLOSE(spec.dest.fd.local);
@@ -3698,7 +3698,7 @@ static int doPeer2PeerMigrate2(virQEMUDriverPtr driver,
*/
cancelled = ret < 0;
-finish:
+ finish:
/* In version 2 of the migration protocol, we pass the
* status code from the sender to the destination host,
* so it can do any cleanup if the migration failed.
@@ -3713,7 +3713,7 @@ finish:
if (cancelled && ddomain)
VIR_ERROR(_("finish step ignored that migration was cancelled"));
-cleanup:
+ cleanup:
if (ddomain) {
virObjectUnref(ddomain);
ret = 0;
@@ -3922,7 +3922,7 @@ doPeer2PeerMigrate3(virQEMUDriverPtr driver,
*/
cancelled = ret < 0;
-finish:
+ finish:
/*
* The status code from the source is passed to the destination.
* The dest can cleanup in the source indicated it failed to
@@ -4128,7 +4128,7 @@ static int doPeer2PeerMigrate(virQEMUDriverPtr driver,
dconnuri, flags, dname, resource);
}
-cleanup:
+ cleanup:
orig_err = virSaveLastError();
qemuDomainObjEnterRemote(vm);
virObjectUnref(dconn);
@@ -4214,7 +4214,7 @@ qemuMigrationPerformJob(virQEMUDriverPtr driver,
VIR_DOMAIN_EVENT_STOPPED_MIGRATED);
}
-endjob:
+ endjob:
if (ret < 0)
orig_err = virSaveLastError();
@@ -4240,7 +4240,7 @@ endjob:
virFreeError(orig_err);
}
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
if (event)
@@ -4300,7 +4300,7 @@ qemuMigrationPerformPhase(virQEMUDriverPtr driver,
qemuMigrationCleanup) < 0)
goto endjob;
-endjob:
+ endjob:
if (ret < 0)
hasrefs = qemuMigrationJobFinish(driver, vm);
else
@@ -4312,7 +4312,7 @@ endjob:
vm = NULL;
}
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
if (event)
@@ -4418,7 +4418,7 @@ qemuMigrationVPAssociatePortProfiles(virDomainDefPtr def)
return 0;
-err_exit:
+ err_exit:
for (i = 0; last_good_net != -1 && i < last_good_net; i++) {
net = def->nets[i];
if (virDomainNetGetActualType(net) == VIR_DOMAIN_NET_TYPE_DIRECT) {
@@ -4634,7 +4634,7 @@ qemuMigrationFinish(virQEMUDriverPtr driver,
if (qemuMigrationBakeCookie(mig, driver, vm, cookieout, cookieoutlen, 0) < 0)
VIR_WARN("Unable to encode migration cookie");
-endjob:
+ endjob:
if (qemuMigrationJobFinish(driver, vm) == 0) {
vm = NULL;
} else if (!vm->persistent && !virDomainObjIsActive(vm)) {
@@ -4642,7 +4642,7 @@ endjob:
vm = NULL;
}
-cleanup:
+ cleanup:
virPortAllocatorRelease(driver->migrationPorts, port);
if (vm) {
VIR_FREE(priv->origname);
@@ -4787,7 +4787,7 @@ qemuMigrationToFile(virQEMUDriverPtr driver, virDomainObjPtr vm,
ret = 0;
-cleanup:
+ cleanup:
/* Restore max migration bandwidth */
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) == 0) {
qemuMonitorSetMigrationSpeed(priv->mon, saveMigBandwidth);
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 5a3210b..205002b 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -319,7 +319,7 @@ qemuMonitorOpenUnix(const char *monitor, pid_t cpid)
return monfd;
-error:
+ error:
VIR_FORCE_CLOSE(monfd);
return -1;
}
@@ -357,12 +357,12 @@ qemuMonitorGetErrorFromLog(qemuMonitorPtr mon)
if ((len = qemuProcessReadLog(mon->logfd, logbuf, 4096 - 1, 0, true)) <= 0)
goto error;
-cleanup:
+ cleanup:
errno = orig_errno;
VIR_FORCE_CLOSE(mon->logfd);
return logbuf;
-error:
+ error:
VIR_FREE(logbuf);
goto cleanup;
}
@@ -830,7 +830,7 @@ qemuMonitorOpenInternal(virDomainObjPtr vm,
return mon;
-cleanup:
+ cleanup:
/* We don't want the 'destroy' callback invoked during
* cleanup from construction failure, because that can
* give a double-unref on virDomainObjPtr in the caller,
@@ -985,7 +985,7 @@ int qemuMonitorSend(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
mon->msg = NULL;
qemuMonitorUpdateWatch(mon);
@@ -1108,7 +1108,7 @@ qemuMonitorFindBalloonObjectPath(qemuMonitorPtr mon,
}
}
-cleanup:
+ cleanup:
for (i = 0; i < npaths; i++)
qemuMonitorJSONListPathFree(paths[i]);
VIR_FREE(paths);
@@ -1141,7 +1141,7 @@ int qemuMonitorHMPCommandWithFd(qemuMonitorPtr mon,
ret = qemuMonitorTextCommandWithFd(mon, cmd, scm_fd, reply);
}
-cleanup:
+ cleanup:
VIR_FREE(json_cmd);
return ret;
}
@@ -1403,7 +1403,7 @@ int qemuMonitorSetCapabilities(qemuMonitorPtr mon)
ret = 0;
}
-cleanup:
+ cleanup:
return ret;
}
@@ -2251,7 +2251,7 @@ int qemuMonitorMigrateToCommand(qemuMonitorPtr mon,
else
ret = qemuMonitorTextMigrate(mon, flags, dest);
-cleanup:
+ cleanup:
VIR_FREE(argstr);
VIR_FREE(dest);
return ret;
@@ -2316,7 +2316,7 @@ int qemuMonitorMigrateToFile(qemuMonitorPtr mon,
else
ret = qemuMonitorTextMigrate(mon, flags, dest);
-cleanup:
+ cleanup:
VIR_FREE(safe_target);
VIR_FREE(argstr);
VIR_FREE(dest);
@@ -2661,7 +2661,7 @@ int qemuMonitorCloseFileHandle(qemuMonitorPtr mon,
else
ret = qemuMonitorTextCloseFileHandle(mon, fdname);
-cleanup:
+ cleanup:
if (error) {
virSetError(error);
virFreeError(error);
@@ -2733,7 +2733,7 @@ qemuMonitorRemoveFd(qemuMonitorPtr mon, int fdset, int fd)
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("remove fd requires JSON monitor"));
-cleanup:
+ cleanup:
if (error) {
virSetError(error);
virFreeError(error);
@@ -2776,7 +2776,7 @@ int qemuMonitorAddHostNetwork(qemuMonitorPtr mon,
else
ret = qemuMonitorTextAddHostNetwork(mon, netstr);
-cleanup:
+ cleanup:
if (ret < 0) {
while (i--) {
if (qemuMonitorCloseFileHandle(mon, tapfdName[i]) < 0)
@@ -2848,7 +2848,7 @@ int qemuMonitorAddNetdev(qemuMonitorPtr mon,
else
ret = qemuMonitorTextAddNetdev(mon, netdevstr);
-cleanup:
+ cleanup:
if (ret < 0) {
while (i--) {
if (qemuMonitorCloseFileHandle(mon, tapfdName[i]) < 0)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index e167df4..a692a07 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -211,7 +211,7 @@ qemuMonitorJSONIOProcessLine(qemuMonitorPtr mon,
_("Unknown JSON reply '%s'"), line);
}
-cleanup:
+ cleanup:
virJSONValueFree(obj);
return ret;
}
@@ -301,7 +301,7 @@ qemuMonitorJSONCommandWithFd(qemuMonitorPtr mon,
}
}
-cleanup:
+ cleanup:
VIR_FREE(id);
VIR_FREE(cmdstr);
VIR_FREE(msg.txBuffer);
@@ -524,7 +524,7 @@ qemuMonitorJSONMakeCommandRaw(bool wrap, const char *cmdname, ...)
return obj;
-error:
+ error:
virJSONValueFree(obj);
virJSONValueFree(jargs);
va_end(args);
@@ -582,7 +582,7 @@ qemuMonitorJSONKeywordStringToJSON(const char *str, const char
*firstkeyword)
qemuFreeKeywords(nkeywords, keywords, values);
return ret;
-error:
+ error:
qemuFreeKeywords(nkeywords, keywords, values);
virJSONValueFree(ret);
return NULL;
@@ -857,7 +857,7 @@ qemuMonitorJSONHandleBlockJobImpl(qemuMonitorPtr mon,
break;
}
-out:
+ out:
qemuMonitorEmitBlockJob(mon, device, type, event);
}
@@ -1002,7 +1002,7 @@ qemuMonitorJSONHumanCommandWithFd(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -1135,7 +1135,7 @@ qemuMonitorJSONGetStatus(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -1261,7 +1261,7 @@ qemuMonitorJSONExtractCPUInfo(virJSONValuePtr reply,
threads = NULL;
ret = ncpus;
-cleanup:
+ cleanup:
VIR_FREE(threads);
return ret;
}
@@ -1333,7 +1333,7 @@ int qemuMonitorJSONGetVirtType(qemuMonitorPtr mon,
*virtType = VIR_DOMAIN_VIRT_KVM;
}
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -1392,7 +1392,7 @@ int qemuMonitorJSONGetBalloonInfo(qemuMonitorPtr mon,
}
}
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -1498,7 +1498,7 @@ int qemuMonitorJSONGetMemoryStats(qemuMonitorPtr mon,
VIR_DOMAIN_MEMORY_STAT_AVAILABLE, 1024);
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
@@ -1622,7 +1622,7 @@ int qemuMonitorJSONGetBlockInfo(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -1782,7 +1782,7 @@ int qemuMonitorJSONGetBlockStatsInfo(qemuMonitorPtr mon,
}
ret = 0;
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -1856,7 +1856,7 @@ int qemuMonitorJSONGetBlockStatsParamsNumber(qemuMonitorPtr mon,
*nparams = num;
ret = 0;
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -1951,7 +1951,7 @@ int qemuMonitorJSONGetBlockExtent(qemuMonitorPtr mon,
}
ret = 0;
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -1985,7 +1985,7 @@ int qemuMonitorJSONBlockResize(qemuMonitorPtr mon,
ret = qemuMonitorJSONCheckError(cmd, reply);
}
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -2041,7 +2041,7 @@ int qemuMonitorJSONSetPassword(qemuMonitorPtr mon,
ret = qemuMonitorJSONCheckError(cmd, reply);
}
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -2072,7 +2072,7 @@ int qemuMonitorJSONExpirePassword(qemuMonitorPtr mon,
ret = qemuMonitorJSONCheckError(cmd, reply);
}
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -2109,7 +2109,7 @@ int qemuMonitorJSONSetBalloon(qemuMonitorPtr mon,
ret = 1;
}
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -2150,12 +2150,12 @@ int qemuMonitorJSONSetCPU(qemuMonitorPtr mon,
if (ret == 0)
ret = 1;
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
-fallback:
+ fallback:
VIR_DEBUG("no QMP support for cpu_set, trying HMP");
ret = qemuMonitorTextSetCPU(mon, cpu, online);
goto cleanup;
@@ -2342,7 +2342,7 @@ qemuMonitorJSONGetMigrationCacheSize(qemuMonitorPtr mon,
}
ret = 0;
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -2716,7 +2716,7 @@ qemuMonitorJSONGetDumpGuestMemoryCapability(qemuMonitorPtr mon,
ret = 0;
}
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -2944,12 +2944,12 @@ qemuMonitorJSONAddFd(qemuMonitorPtr mon, int fdset, int fd, const
char *name)
}
}
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
-error:
+ error:
/* Best effort cleanup - kill the entire fdset (even if it has
* earlier successful fd registrations), since we don't know which
* 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)
ret = qemuMonitorJSONCheckError(cmd, reply);
-cleanup:
+ cleanup:
virJSONValueFree(args);
virJSONValueFree(cmd);
virJSONValueFree(reply);
@@ -3104,7 +3104,7 @@ static int qemuMonitorJSONExtractPtyPaths(virJSONValuePtr reply,
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
@@ -3202,7 +3202,7 @@ int qemuMonitorJSONAddDevice(qemuMonitorPtr mon,
if (ret == 0)
ret = qemuMonitorJSONCheckError(cmd, reply);
-cleanup:
+ cleanup:
virJSONValueFree(args);
virJSONValueFree(cmd);
virJSONValueFree(reply);
@@ -3322,7 +3322,7 @@ qemuMonitorJSONDiskSnapshot(qemuMonitorPtr mon, virJSONValuePtr
actions,
ret = qemuMonitorJSONCheckError(cmd, reply);
}
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -3357,7 +3357,7 @@ qemuMonitorJSONDriveMirror(qemuMonitorPtr mon,
goto cleanup;
ret = qemuMonitorJSONCheckError(cmd, reply);
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -3384,7 +3384,7 @@ qemuMonitorJSONTransaction(qemuMonitorPtr mon, virJSONValuePtr
actions)
ret = qemuMonitorJSONCheckError(cmd, reply);
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
actions->protect = protect;
@@ -3414,7 +3414,7 @@ qemuMonitorJSONBlockCommit(qemuMonitorPtr mon, const char *device,
goto cleanup;
ret = qemuMonitorJSONCheckError(cmd, reply);
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -3439,7 +3439,7 @@ qemuMonitorJSONDrivePivot(qemuMonitorPtr mon, const char *device,
goto cleanup;
ret = qemuMonitorJSONCheckError(cmd, reply);
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -3470,7 +3470,7 @@ int qemuMonitorJSONArbitraryCommand(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
@@ -3497,7 +3497,7 @@ int qemuMonitorJSONInjectNMI(qemuMonitorPtr mon)
ret = qemuMonitorJSONCheckError(cmd, reply);
}
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -3565,7 +3565,7 @@ int qemuMonitorJSONSendKey(qemuMonitorPtr mon,
ret = qemuMonitorJSONCheckError(cmd, reply);
}
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
virJSONValueFree(keys);
@@ -3898,7 +3898,7 @@ qemuMonitorJSONBlockIoThrottleInfo(virJSONValuePtr result,
}
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
#undef GET_THROTTLE_STATS
@@ -4070,7 +4070,7 @@ int qemuMonitorJSONGetVersion(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -4165,7 +4165,7 @@ int qemuMonitorJSONGetMachines(qemuMonitorPtr mon,
ret = n;
*machines = infolist;
-cleanup:
+ cleanup:
if (ret < 0 && infolist) {
for (i = 0; i < n; i++)
qemuMonitorMachineInfoFree(infolist[i]);
@@ -4248,7 +4248,7 @@ int qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon,
ret = n;
*cpus = cpulist;
-cleanup:
+ cleanup:
if (ret < 0)
virStringFreeList(cpulist);
virJSONValueFree(cmd);
@@ -4316,7 +4316,7 @@ int qemuMonitorJSONGetCommands(qemuMonitorPtr mon,
ret = n;
*commands = commandlist;
-cleanup:
+ cleanup:
if (ret < 0)
virStringFreeList(commandlist);
virJSONValueFree(cmd);
@@ -4389,7 +4389,7 @@ int qemuMonitorJSONGetEvents(qemuMonitorPtr mon,
ret = n;
*events = eventlist;
-cleanup:
+ cleanup:
if (ret < 0)
virStringFreeList(eventlist);
virJSONValueFree(cmd);
@@ -4502,7 +4502,7 @@ qemuMonitorJSONGetCommandLineOptionParameters(qemuMonitorPtr mon,
ret = n;
*params = paramlist;
-cleanup:
+ cleanup:
/* If we failed before getting the JSON array of options, we (try)
* to cache an empty array to speed up the next failure. */
if (!qemuMonitorGetOptions(mon))
@@ -4560,7 +4560,7 @@ int qemuMonitorJSONGetKVMState(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -4626,7 +4626,7 @@ int qemuMonitorJSONGetObjectTypes(qemuMonitorPtr mon,
ret = n;
*types = typelist;
-cleanup:
+ cleanup:
if (ret < 0)
virStringFreeList(typelist);
virJSONValueFree(cmd);
@@ -4713,7 +4713,7 @@ int qemuMonitorJSONGetObjectListPaths(qemuMonitorPtr mon,
ret = n;
*paths = pathlist;
-cleanup:
+ cleanup:
if (ret < 0 && pathlist) {
for (i = 0; i < n; i++)
qemuMonitorJSONListPathFree(pathlist[i]);
@@ -4811,7 +4811,7 @@ int qemuMonitorJSONGetObjectProperty(qemuMonitorPtr mon,
}
ret = 0;
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
@@ -4872,7 +4872,7 @@ int qemuMonitorJSONSetObjectProperty(qemuMonitorPtr mon,
if ((ret = qemuMonitorJSONCommand(mon, cmd, &reply)) == 0)
ret = qemuMonitorJSONCheckError(cmd, reply);
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
@@ -4948,7 +4948,7 @@ int qemuMonitorJSONGetObjectProps(qemuMonitorPtr mon,
ret = n;
*props = proplist;
-cleanup:
+ cleanup:
if (ret < 0)
virStringFreeList(proplist);
virJSONValueFree(cmd);
@@ -4992,7 +4992,7 @@ qemuMonitorJSONGetTargetArch(qemuMonitorPtr mon)
ignore_value(VIR_STRDUP(ret, arch));
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -5057,7 +5057,7 @@ qemuMonitorJSONGetMigrationCapability(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -5107,7 +5107,7 @@ qemuMonitorJSONSetMigrationCapability(qemuMonitorPtr mon,
ret = qemuMonitorJSONCheckError(cmd, reply);
-cleanup:
+ cleanup:
virJSONValueFree(caps);
virJSONValueFree(cap);
virJSONValueFree(cmd);
@@ -5134,7 +5134,7 @@ qemuMonitorJSONBuildInetSocketAddress(const char *host,
goto error;
return addr;
-error:
+ error:
virJSONValueFree(data);
virJSONValueFree(addr);
return NULL;
@@ -5156,7 +5156,7 @@ qemuMonitorJSONBuildUnixSocketAddress(const char *path)
goto error;
return addr;
-error:
+ error:
virReportOOMError();
virJSONValueFree(data);
virJSONValueFree(addr);
@@ -5196,7 +5196,7 @@ qemuMonitorJSONNBDServerStart(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(port_str);
virJSONValueFree(reply);
virJSONValueFree(cmd);
@@ -5318,7 +5318,7 @@ qemuMonitorJSONGetStringArray(qemuMonitorPtr mon, const char
*qmpCmd,
ret = n;
*array = list;
-cleanup:
+ cleanup:
if (ret < 0)
virStringFreeList(list);
virJSONValueFree(cmd);
@@ -5443,9 +5443,9 @@ qemuMonitorJSONAttachCharDevCommand(const char *chrID,
return ret;
-no_memory:
+ no_memory:
virReportOOMError();
-error:
+ error:
virJSONValueFree(addr);
virJSONValueFree(data);
virJSONValueFree(backend);
@@ -5493,7 +5493,7 @@ qemuMonitorJSONAttachCharDev(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
@@ -5553,7 +5553,7 @@ qemuMonitorJSONGetDeviceAliases(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
for (i = 0; i < n; i++)
qemuMonitorJSONListPathFree(paths[i]);
VIR_FREE(paths);
@@ -5708,7 +5708,7 @@ qemuMonitorJSONGetCPUx86Data(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
virCPUx86DataFree(x86Data);
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index 558f93c..ad63140 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -430,7 +430,7 @@ qemuMonitorTextGetStatus(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(reply);
return ret;
}
@@ -486,7 +486,7 @@ qemuMonitorTextSetLink(qemuMonitorPtr mon,
VIR_FREE(cmd);
return 0;
-error:
+ error:
VIR_FREE(info);
VIR_FREE(cmd);
@@ -556,7 +556,7 @@ int qemuMonitorTextGetCPUInfo(qemuMonitorPtr mon,
*pids = cpupids;
return ncpupids;
-error:
+ error:
VIR_FREE(qemucpus);
VIR_FREE(cpupids);
@@ -707,7 +707,7 @@ int qemuMonitorTextGetBalloonInfo(qemuMonitorPtr mon,
ret = 0;
}
-cleanup:
+ cleanup:
VIR_FREE(reply);
return ret;
}
@@ -834,7 +834,7 @@ int qemuMonitorTextGetBlockInfo(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(info);
VIR_FREE(reply);
return ret;
@@ -1071,7 +1071,7 @@ int qemuMonitorTextBlockResize(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(reply);
return ret;
@@ -1145,7 +1145,7 @@ int qemuMonitorTextSetPassword(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(reply);
VIR_FREE(cmd);
return ret;
@@ -1174,7 +1174,7 @@ int qemuMonitorTextExpirePassword(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(reply);
VIR_FREE(cmd);
return ret;
@@ -1276,7 +1276,7 @@ int qemuMonitorTextEjectMedia(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(reply);
VIR_FREE(cmd);
return ret;
@@ -1320,7 +1320,7 @@ int qemuMonitorTextChangeMedia(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(reply);
VIR_FREE(cmd);
VIR_FREE(safepath);
@@ -1351,7 +1351,7 @@ static int qemuMonitorTextSaveMemory(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(reply);
VIR_FREE(safepath);
@@ -1391,7 +1391,7 @@ int qemuMonitorTextSetMigrationSpeed(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(info);
VIR_FREE(cmd);
return ret;
@@ -1413,7 +1413,7 @@ int qemuMonitorTextSetMigrationDowntime(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(info);
VIR_FREE(cmd);
return ret;
@@ -1545,10 +1545,10 @@ int qemuMonitorTextGetMigrationStatus(qemuMonitorPtr mon,
}
}
-done:
+ done:
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(reply);
if (ret < 0)
memset(status, 0, sizeof(*status));
@@ -1607,7 +1607,7 @@ int qemuMonitorTextMigrate(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(extrastr);
VIR_FREE(safedest);
VIR_FREE(info);
@@ -1681,7 +1681,7 @@ int qemuMonitorTextAddUSBDisk(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(safepath);
VIR_FREE(info);
@@ -1712,7 +1712,7 @@ static int qemuMonitorTextAddUSBDevice(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(reply);
return ret;
@@ -1848,7 +1848,7 @@ int qemuMonitorTextAddPCIHostDevice(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(reply);
return ret;
@@ -1870,7 +1870,7 @@ int qemuMonitorTextAddPCIDisk(qemuMonitorPtr mon,
if (!safe_path)
return -1;
-try_command:
+ try_command:
if (virAsprintf(&cmd, "pci_add %s storage file=%s,if=%s",
(tryOldSyntax ? "0": "pci_addr=auto"), safe_path,
bus) < 0)
goto cleanup;
@@ -1893,7 +1893,7 @@ try_command:
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(safe_path);
VIR_FREE(cmd);
VIR_FREE(reply);
@@ -1923,7 +1923,7 @@ int qemuMonitorTextAddPCINetwork(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(reply);
VIR_FREE(cmd);
return ret;
@@ -1938,7 +1938,7 @@ int qemuMonitorTextRemovePCIDevice(qemuMonitorPtr mon,
bool tryOldSyntax = false;
int ret = -1;
-try_command:
+ try_command:
if (tryOldSyntax) {
if (virAsprintf(&cmd, "pci_del 0 %.2x", guestAddr->slot) <
0)
goto cleanup;
@@ -1974,7 +1974,7 @@ try_command:
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(reply);
return ret;
@@ -2013,7 +2013,7 @@ int qemuMonitorTextSendFileHandle(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(reply);
return ret;
@@ -2044,7 +2044,7 @@ int qemuMonitorTextCloseFileHandle(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(reply);
return ret;
@@ -2073,7 +2073,7 @@ int qemuMonitorTextAddHostNetwork(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(reply);
return ret;
@@ -2098,7 +2098,7 @@ int qemuMonitorTextRemoveHostNetwork(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(reply);
return ret;
@@ -2122,7 +2122,7 @@ int qemuMonitorTextAddNetdev(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(reply);
return ret;
@@ -2146,7 +2146,7 @@ int qemuMonitorTextRemoveNetdev(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(reply);
return ret;
@@ -2229,7 +2229,7 @@ int qemuMonitorTextGetPtyPaths(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(reply);
return ret;
}
@@ -2244,7 +2244,7 @@ int qemuMonitorTextAttachPCIDiskController(qemuMonitorPtr mon,
bool tryOldSyntax = false;
int ret = -1;
-try_command:
+ try_command:
if (virAsprintf(&cmd, "pci_add %s storage if=%s",
(tryOldSyntax ? "0": "pci_addr=auto"), bus) <
0)
goto cleanup;
@@ -2267,7 +2267,7 @@ try_command:
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(reply);
return ret;
@@ -2334,7 +2334,7 @@ int qemuMonitorTextAttachDrive(qemuMonitorPtr mon,
if (!safe_str)
return -1;
-try_command:
+ try_command:
if (virAsprintf(&cmd, "drive_add %s%.2x:%.2x:%.2x %s",
(tryOldSyntax ? "" : "pci_addr="),
controllerAddr->domain, controllerAddr->bus,
@@ -2364,7 +2364,7 @@ try_command:
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(reply);
VIR_FREE(safe_str);
@@ -2487,7 +2487,7 @@ int qemuMonitorTextGetAllPCIAddresses(qemuMonitorPtr mon,
return naddrs;
-error:
+ error:
VIR_FREE(addrs);
VIR_FREE(reply);
return -1;
@@ -2524,7 +2524,7 @@ int qemuMonitorTextDelDevice(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(reply);
VIR_FREE(safedev);
@@ -2567,7 +2567,7 @@ int qemuMonitorTextAddDevice(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(reply);
VIR_FREE(safedev);
@@ -2609,7 +2609,7 @@ int qemuMonitorTextAddDrive(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(reply);
VIR_FREE(safe_str);
@@ -2655,7 +2655,7 @@ int qemuMonitorTextDriveDel(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(reply);
VIR_FREE(safedev);
@@ -2694,7 +2694,7 @@ int qemuMonitorTextSetDrivePassphrase(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(reply);
VIR_FREE(safe_str);
@@ -2737,7 +2737,7 @@ int qemuMonitorTextCreateSnapshot(qemuMonitorPtr mon, const char
*name)
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(safename);
VIR_FREE(cmd);
VIR_FREE(reply);
@@ -2790,7 +2790,7 @@ int qemuMonitorTextLoadSnapshot(qemuMonitorPtr mon, const char
*name)
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(safename);
VIR_FREE(cmd);
VIR_FREE(reply);
@@ -2827,7 +2827,7 @@ int qemuMonitorTextDeleteSnapshot(qemuMonitorPtr mon, const char
*name)
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(safename);
VIR_FREE(cmd);
VIR_FREE(reply);
@@ -2918,7 +2918,7 @@ int qemuMonitorTextSendKey(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(reply);
return ret;
@@ -2944,7 +2944,7 @@ int qemuMonitorTextScreendump(qemuMonitorPtr mon, const char *file)
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(reply);
VIR_FREE(cmd);
return ret;
@@ -2971,7 +2971,7 @@ int qemuMonitorTextOpenGraphics(qemuMonitorPtr mon,
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(reply);
VIR_FREE(cmd);
return ret;
@@ -3005,7 +3005,7 @@ int qemuMonitorTextSetBlockIoThrottle(qemuMonitorPtr mon,
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cmd);
VIR_FREE(result);
return ret;
@@ -3082,7 +3082,7 @@ qemuMonitorTextParseBlockIoThrottle(const char *result,
virReportError(VIR_ERR_INVALID_ARG,
_("No info for device '%s'"), device);
-cleanup:
+ cleanup:
return ret;
}
@@ -3105,7 +3105,7 @@ int qemuMonitorTextGetBlockIoThrottle(qemuMonitorPtr mon,
ret = qemuMonitorTextParseBlockIoThrottle(result, device, reply);
-cleanup:
+ cleanup:
VIR_FREE(result);
return ret;
}
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 96dc66b..583ff76 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -107,7 +107,7 @@ qemuProcessRemoveDomainStatus(virQEMUDriverPtr driver,
vm->def->name, virStrerror(errno, ebuf, sizeof(ebuf)));
ret = 0;
-cleanup:
+ cleanup:
virObjectUnref(cfg);
return ret;
}
@@ -151,7 +151,7 @@ qemuProcessHandleAgentEOF(qemuAgentPtr agent,
qemuAgentClose(agent);
return;
-unlock:
+ unlock:
virObjectUnlock(vm);
return;
}
@@ -276,7 +276,7 @@ qemuConnectAgent(virQEMUDriverPtr driver, virDomainObjPtr vm)
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
@@ -334,10 +334,10 @@ qemuProcessHandleMonitorEOF(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
goto cleanup;
}
-unlock:
+ unlock:
virObjectUnlock(vm);
-cleanup:
+ cleanup:
if (event)
qemuDomainEventQueue(driver, event);
}
@@ -488,7 +488,7 @@ qemuProcessGetVolumeQcowPassphrase(virConnectPtr conn,
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
@@ -512,7 +512,7 @@ qemuProcessFindVolumeQcowPassphrase(qemuMonitorPtr mon
ATTRIBUTE_UNUSED,
ret = qemuProcessGetVolumeQcowPassphrase(conn, disk, secretRet, secretLen);
-cleanup:
+ cleanup:
virObjectUnlock(vm);
return ret;
}
@@ -608,11 +608,11 @@ qemuProcessFakeReboot(void *opaque)
ret = 0;
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;
-cleanup:
+ cleanup:
if (vm) {
if (ret == -1) {
ignore_value(qemuProcessKill(vm, VIR_QEMU_PROCESS_KILL_FORCE));
@@ -722,7 +722,7 @@ qemuProcessHandleShutdown(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
qemuProcessShutdownOrReboot(driver, vm);
-unlock:
+ unlock:
virObjectUnlock(vm);
if (event)
qemuDomainEventQueue(driver, event);
@@ -769,7 +769,7 @@ qemuProcessHandleStop(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
}
}
-unlock:
+ unlock:
virObjectUnlock(vm);
if (event)
qemuDomainEventQueue(driver, event);
@@ -823,7 +823,7 @@ qemuProcessHandleResume(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
}
}
-unlock:
+ unlock:
virObjectUnlock(vm);
if (event)
qemuDomainEventQueue(driver, event);
@@ -1109,7 +1109,7 @@ qemuProcessHandleGraphics(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
return 0;
-error:
+ error:
if (localAddr) {
VIR_FREE(localAddr->service);
VIR_FREE(localAddr->node);
@@ -1354,7 +1354,7 @@ qemuProcessHandleGuestPanic(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
VIR_FREE(processEvent);
}
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
@@ -1387,7 +1387,7 @@ qemuProcessHandleDeviceDeleted(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
VIR_WARN("unable to save domain status with balloon change");
-cleanup:
+ cleanup:
virObjectUnlock(vm);
virObjectUnref(cfg);
return 0;
@@ -1476,7 +1476,7 @@ qemuConnectMonitor(virQEMUDriverPtr driver, virDomainObjPtr vm, int
logfd)
ret = virQEMUCapsProbeQMP(priv->qemuCaps, priv->mon);
qemuDomainObjExitMonitor(driver, vm);
-error:
+ error:
return ret;
}
@@ -1594,7 +1594,7 @@ qemuProcessReadLogOutput(virDomainObjPtr vm,
_("Timed out while reading %s log output: %s"),
what, buf);
-cleanup:
+ cleanup:
return ret;
}
@@ -1657,7 +1657,7 @@ qemuProcessReadChildErrors(virQEMUDriverPtr driver,
ret = 0;
-cleanup:
+ cleanup:
VIR_FORCE_CLOSE(logfd);
return ret;
}
@@ -1924,7 +1924,7 @@ qemuProcessWaitForMonitor(virQEMUDriverPtr driver,
if (ret == 0)
ret = qemuProcessFindCharDevicePTYsMonitor(vm, qemuCaps, paths);
-cleanup:
+ cleanup:
virHashFree(paths);
if (pos != -1 && kill(vm->pid, 0) == -1 && errno == ESRCH) {
@@ -1948,7 +1948,7 @@ cleanup:
ret = -1;
}
-closelog:
+ closelog:
if (VIR_CLOSE(logfd) < 0) {
char ebuf[1024];
VIR_WARN("Unable to close logfile: %s",
@@ -2049,7 +2049,7 @@ qemuPrepareCpumap(virQEMUDriverPtr driver,
}
}
-cleanup:
+ cleanup:
virObjectUnref(caps);
return cpumap;
}
@@ -2097,7 +2097,7 @@ qemuProcessInitCpuAffinity(virQEMUDriverPtr driver,
ret = 0;
-cleanup:
+ cleanup:
virBitmapFree(cpumap);
return ret;
}
@@ -2164,7 +2164,7 @@ qemuProcessSetVcpuAffinities(virConnectPtr conn ATTRIBUTE_UNUSED,
}
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
@@ -2241,7 +2241,7 @@ qemuProcessInitPasswords(virConnectPtr conn,
}
}
-cleanup:
+ cleanup:
virObjectUnref(cfg);
return ret;
}
@@ -2706,7 +2706,7 @@ static int qemuProcessHook(void *data)
ret = 0;
-cleanup:
+ cleanup:
virObjectUnref(h->cfg);
VIR_DEBUG("Hook complete ret=%d", ret);
return ret;
@@ -2765,7 +2765,7 @@ qemuProcessStartCPUs(virQEMUDriverPtr driver, virDomainObjPtr vm,
VIR_DEBUG("Preserving lock state '%s'",
NULLSTR(priv->lockState));
}
-cleanup:
+ cleanup:
virObjectUnref(cfg);
return ret;
}
@@ -3123,7 +3123,7 @@ qemuProcessUpdateDevices(virQEMUDriverPtr driver,
}
ret = 0;
-cleanup:
+ cleanup:
virStringFreeList(old);
return ret;
}
@@ -3295,7 +3295,7 @@ qemuProcessReconnect(void *opaque)
if (virAtomicIntInc(&driver->nactive) == 1 &&
driver->inhibitCallback)
driver->inhibitCallback(true, driver->inhibitOpaque);
-endjob:
+ endjob:
if (!qemuDomainObjEndJob(driver, obj))
obj = NULL;
@@ -3307,7 +3307,7 @@ endjob:
return;
-error:
+ error:
if (!qemuDomainObjEndJob(driver, obj))
obj = NULL;
@@ -3411,7 +3411,7 @@ qemuProcessReconnectHelper(virDomainObjPtr obj,
return 0;
-error:
+ error:
VIR_FREE(data);
return -1;
}
@@ -3533,7 +3533,7 @@ qemuProcessSPICEAllocatePorts(virQEMUDriverPtr driver,
return 0;
-error:
+ error:
virPortAllocatorRelease(driver->remotePorts, port);
return -1;
}
@@ -3597,7 +3597,7 @@ qemuProcessVerifyGuestCPU(virQEMUDriverPtr driver, virDomainObjPtr
vm)
ret = true;
-cleanup:
+ cleanup:
cpuDataFree(guestcpu);
return ret;
}
@@ -4198,7 +4198,7 @@ int qemuProcessStart(virConnectPtr conn,
return 0;
-cleanup:
+ cleanup:
/* 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
* pretend we never started it */
@@ -4440,7 +4440,7 @@ void qemuProcessStop(virQEMUDriverPtr driver,
networkReleaseActualDevice(vm->def, net);
}
-retry:
+ retry:
if ((ret = qemuRemoveCgroup(vm)) < 0) {
if (ret == -EBUSY && (retries++ < 5)) {
usleep(200*1000);
@@ -4741,7 +4741,7 @@ int qemuProcessAttach(virConnectPtr conn ATTRIBUTE_UNUSED,
return 0;
-error:
+ error:
/* We jump here if we failed to attach to the VM for any reason.
* Leave the domain running, but pretend we never attempted to
* attach to it. */
@@ -4800,7 +4800,7 @@ qemuProcessAutoDestroy(virDomainObjPtr dom,
if (event)
qemuDomainEventQueue(driver, event);
-cleanup:
+ cleanup:
return dom;
}
--
1.8.3.2