Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/qemu/qemu_agent.c | 6 ++--
src/qemu/qemu_block.c | 20 ++++++------
src/qemu/qemu_blockjob.c | 6 ++--
src/qemu/qemu_capabilities.c | 14 ++++-----
src/qemu/qemu_cgroup.c | 2 +-
src/qemu/qemu_command.c | 2 +-
src/qemu/qemu_domain.c | 26 ++++++++--------
src/qemu/qemu_driver.c | 52 ++++++++++++++++----------------
src/qemu/qemu_firmware.c | 16 +++++-----
src/qemu/qemu_hotplug.c | 4 +--
src/qemu/qemu_migration.c | 14 ++++-----
src/qemu/qemu_migration_cookie.c | 2 +-
src/qemu/qemu_migration_params.c | 4 +--
src/qemu/qemu_monitor.c | 16 +++++-----
src/qemu/qemu_monitor_json.c | 16 +++++-----
src/qemu/qemu_process.c | 10 +++---
src/qemu/qemu_vhost_user.c | 8 ++---
17 files changed, 109 insertions(+), 109 deletions(-)
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index ccd076d540..bd5b8035ca 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -2163,7 +2163,7 @@ qemuAgentGetFSInfoInternal(qemuAgentPtr mon,
goto cleanup;
}
- VIR_STEAL_PTR(*info, info_ret);
+ *info = g_steal_pointer(&info_ret);
ret = ndata;
cleanup:
@@ -2200,7 +2200,7 @@ qemuAgentGetFSInfo(qemuAgentPtr mon,
goto cleanup;
}
- VIR_STEAL_PTR(*info, info_ret);
+ *info = g_steal_pointer(&info_ret);
ret = nfs;
cleanup:
@@ -2485,7 +2485,7 @@ qemuAgentGetInterfaces(qemuAgentPtr mon,
iface->naddrs = addrs_count;
}
- VIR_STEAL_PTR(*ifaces, ifaces_ret);
+ *ifaces = g_steal_pointer(&ifaces_ret);
ret = ifaces_count;
cleanup:
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 8841006c96..4dc4f2922d 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -184,8 +184,8 @@ qemuBlockNodeNameGetBackingChainBacking(virJSONValuePtr next,
&backingdata) < 0)
return -1;
- VIR_STEAL_PTR(data->backing, backingdata);
- VIR_STEAL_PTR(*nodenamedata, data);
+ data->backing = g_steal_pointer(&backingdata);
+ *nodenamedata = g_steal_pointer(&data);
return 0;
}
@@ -1675,7 +1675,7 @@ qemuBlockStorageSourceDetachPrepare(virStorageSourcePtr src,
goto cleanup;
if (driveAlias) {
- VIR_STEAL_PTR(data->driveAlias, driveAlias);
+ data->driveAlias = g_steal_pointer(&driveAlias);
data->driveAdded = true;
} else {
data->formatNodeName = src->nodeformat;
@@ -1704,7 +1704,7 @@ qemuBlockStorageSourceDetachPrepare(virStorageSourcePtr src,
goto cleanup;
}
- VIR_STEAL_PTR(ret, data);
+ ret = g_steal_pointer(&data);
cleanup:
VIR_FREE(driveAlias);
@@ -2035,7 +2035,7 @@
qemuBlockStorageSourceCreateGetFormatPropsGeneric(virStorageSourcePtr src,
qemuBlockStorageSourceCreateAddBacking(backing, props, false) < 0)
return -1;
- VIR_STEAL_PTR(*retprops, props);
+ *retprops = g_steal_pointer(&props);
return 0;
}
@@ -2076,7 +2076,7 @@ qemuBlockStorageSourceCreateGetEncryptionLUKS(virStorageSourcePtr
src,
return -1;
}
- VIR_STEAL_PTR(*luksProps, props);
+ *luksProps = g_steal_pointer(&props);
return 0;
}
@@ -2097,7 +2097,7 @@ qemuBlockStorageSourceCreateGetFormatPropsLUKS(virStorageSourcePtr
src,
NULL) < 0)
return -1;
- VIR_STEAL_PTR(*props, luksprops);
+ *props = g_steal_pointer(&luksprops);
return 0;
}
@@ -2155,7 +2155,7 @@ qemuBlockStorageSourceCreateGetFormatPropsQcow2(virStorageSourcePtr
src,
qemuBlockStorageSourceCreateAddEncryptionQcow(src, qcow2props) < 0)
return -1;
- VIR_STEAL_PTR(*props, qcow2props);
+ *props = g_steal_pointer(&qcow2props);
return 0;
}
@@ -2178,7 +2178,7 @@ qemuBlockStorageSourceCreateGetFormatPropsQcow(virStorageSourcePtr
src,
qemuBlockStorageSourceCreateAddEncryptionQcow(src, qcowprops) < 0)
return -1;
- VIR_STEAL_PTR(*props, qcowprops);
+ *props = g_steal_pointer(&qcowprops);
return 0;
}
@@ -2200,7 +2200,7 @@ qemuBlockStorageSourceCreateGetFormatPropsQed(virStorageSourcePtr
src,
if (qemuBlockStorageSourceCreateAddBacking(backing, qedprops, true) < 0)
return -1;
- VIR_STEAL_PTR(*props, qedprops);
+ *props = g_steal_pointer(&qedprops);
return 0;
}
diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
index 6b2c370d9f..3506fa165b 100644
--- a/src/qemu/qemu_blockjob.c
+++ b/src/qemu/qemu_blockjob.c
@@ -627,7 +627,7 @@ qemuBlockJobRewriteConfigDiskSource(virDomainObjPtr vm,
}
virObjectUnref(persistDisk->src);
- VIR_STEAL_PTR(persistDisk->src, copy);
+ persistDisk->src = g_steal_pointer(©);
}
@@ -1148,13 +1148,13 @@ qemuBlockJobProcessEventConcludedCopyPivot(virQEMUDriverPtr
driver,
* inherit the rest of the chain */
if (job->data.copy.shallownew &&
!virStorageSourceIsBacking(job->disk->mirror->backingStore))
- VIR_STEAL_PTR(job->disk->mirror->backingStore,
job->disk->src->backingStore);
+ job->disk->mirror->backingStore =
g_steal_pointer(&job->disk->src->backingStore);
qemuBlockJobRewriteConfigDiskSource(vm, job->disk, job->disk->mirror);
qemuBlockJobEventProcessConcludedRemoveChain(driver, vm, asyncJob,
job->disk->src);
virObjectUnref(job->disk->src);
- VIR_STEAL_PTR(job->disk->src, job->disk->mirror);
+ job->disk->src = g_steal_pointer(&job->disk->mirror);
}
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index b8f5153cbc..3ce1556fc2 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1590,7 +1590,7 @@ virQEMUCapsSEVInfoCopy(virSEVCapabilityPtr *dst,
tmp->cbitpos = src->cbitpos;
tmp->reduced_phys_bits = src->reduced_phys_bits;
- VIR_STEAL_PTR(*dst, tmp);
+ *dst = g_steal_pointer(&tmp);
return 0;
}
@@ -2666,7 +2666,7 @@ virQEMUCapsGetCPUFeatures(virQEMUCapsPtr qemuCaps,
goto cleanup;
}
- VIR_STEAL_PTR(*features, list);
+ *features = g_steal_pointer(&list);
if (migratable && !modelInfo->migratability)
ret = 1;
else
@@ -3105,7 +3105,7 @@ virQEMUCapsGetCPUModelX86Data(virQEMUCapsPtr qemuCaps,
if (virCPUx86DataSetSignature(data, sigFamily, sigModel, sigStepping) < 0)
goto cleanup;
- VIR_STEAL_PTR(ret, data);
+ ret = g_steal_pointer(&data);
cleanup:
virCPUDataFree(data);
@@ -3620,7 +3620,7 @@ virQEMUCapsParseSEVInfo(virQEMUCapsPtr qemuCaps, xmlXPathContextPtr
ctxt)
return -1;
}
- VIR_STEAL_PTR(qemuCaps->sevCapabilities, sev);
+ qemuCaps->sevCapabilities = g_steal_pointer(&sev);
return 0;
}
@@ -4561,7 +4561,7 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
}
qemuCaps->version = major * 1000000 + minor * 1000 + micro;
- VIR_STEAL_PTR(qemuCaps->package, package);
+ qemuCaps->package = g_steal_pointer(&package);
qemuCaps->usedQMP = true;
if (virQEMUCapsInitQMPArch(qemuCaps, mon) < 0)
@@ -5112,7 +5112,7 @@ virQEMUCapsCacheLookupDefault(virFileCachePtr cache,
if (retMachine)
*retMachine = machine;
- VIR_STEAL_PTR(ret, qemuCaps);
+ ret = g_steal_pointer(&qemuCaps);
cleanup:
virObjectUnref(qemuCaps);
@@ -5599,7 +5599,7 @@ virQEMUCapsFillDomainFeatureSEVCaps(virQEMUCapsPtr qemuCaps,
sev->cbitpos = cap->cbitpos;
sev->reduced_phys_bits = cap->reduced_phys_bits;
- VIR_STEAL_PTR(domCaps->sev, sev);
+ domCaps->sev = g_steal_pointer(&sev);
return 0;
}
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index f1776a7c0b..dacbb603b0 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -1335,7 +1335,7 @@ qemuCgroupEmulatorAllNodesAllow(virCgroupPtr cgroup,
virCgroupSetCpusetMems(data->emulatorCgroup, all_nodes_str) < 0)
goto cleanup;
- VIR_STEAL_PTR(*retData, data);
+ *retData = g_steal_pointer(&data);
ret = 0;
cleanup:
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 3991ea3234..7b6cc725f4 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -10751,7 +10751,7 @@ qemuBuildStorageSourceAttachPrepareDrive(virDomainDiskDefPtr
disk,
!(data->driveAlias = qemuAliasDiskDriveFromDisk(disk)))
return NULL;
- VIR_STEAL_PTR(ret, data);
+ ret = g_steal_pointer(&data);
return ret;
}
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index e8f8749b94..fb008fcbb0 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -392,7 +392,7 @@ qemuDomainObjRestoreJob(virDomainObjPtr obj,
job->asyncJob = priv->job.asyncJob;
job->asyncOwner = priv->job.asyncOwner;
job->phase = priv->job.phase;
- VIR_STEAL_PTR(job->migParams, priv->job.migParams);
+ job->migParams = g_steal_pointer(&priv->job.migParams);
job->apiFlags = priv->job.apiFlags;
qemuDomainObjResetJob(priv);
@@ -2230,7 +2230,7 @@ qemuStorageSourcePrivateDataAssignSecinfo(qemuDomainSecretInfoPtr
*secinfo,
}
if ((*secinfo)->type == VIR_DOMAIN_SECRET_INFO_TYPE_AES)
- VIR_STEAL_PTR((*secinfo)->s.aes.alias, *alias);
+ (*secinfo)->s.aes.alias = g_steal_pointer(&*alias);
return 0;
}
@@ -3345,7 +3345,7 @@ qemuDomainObjPrivateXMLParseJobNBDSource(xmlNodePtr node,
VIR_DOMAIN_DEF_PARSE_STATUS, xmlopt) < 0)
return -1;
- VIR_STEAL_PTR(diskPriv->migrSource, migrSource);
+ diskPriv->migrSource = g_steal_pointer(&migrSource);
return 0;
}
@@ -3608,7 +3608,7 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt,
}
}
- VIR_STEAL_PTR(priv->qemuCaps, qemuCaps);
+ priv->qemuCaps = g_steal_pointer(&qemuCaps);
}
VIR_FREE(nodes);
@@ -3665,7 +3665,7 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt,
if (qemuDomainObjPrivateXMLParseSlirpFeatures(nodes[i], ctxt, slirp) < 0)
goto error;
- VIR_STEAL_PTR(QEMU_DOMAIN_NETWORK_PRIVATE(dev.data.net)->slirp, slirp);
+ QEMU_DOMAIN_NETWORK_PRIVATE(dev.data.net)->slirp =
g_steal_pointer(&slirp);
}
VIR_FREE(nodes);
@@ -3920,7 +3920,7 @@ qemuDomainDefNamespaceParse(xmlXPathContextPtr ctxt,
if (nsdata->num_args > 0 || nsdata->num_env > 0 ||
nsdata->ncapsadd > 0 || nsdata->ncapsdel > 0)
- VIR_STEAL_PTR(*data, nsdata);
+ *data = g_steal_pointer(&nsdata);
ret = 0;
@@ -12206,11 +12206,11 @@ qemuDomainRefreshVcpuInfo(virQEMUDriverPtr driver,
vcpupriv->node_id = info[i].node_id;
vcpupriv->vcpus = info[i].vcpus;
VIR_FREE(vcpupriv->type);
- VIR_STEAL_PTR(vcpupriv->type, info[i].type);
+ vcpupriv->type = g_steal_pointer(&info[i].type);
VIR_FREE(vcpupriv->alias);
- VIR_STEAL_PTR(vcpupriv->alias, info[i].alias);
+ vcpupriv->alias = g_steal_pointer(&info[i].alias);
virJSONValueFree(vcpupriv->props);
- VIR_STEAL_PTR(vcpupriv->props, info[i].props);
+ vcpupriv->props = g_steal_pointer(&info[i].props);
vcpupriv->enable_id = info[i].id;
vcpupriv->qemu_id = info[i].qemu_id;
@@ -13178,7 +13178,7 @@ qemuDomainCreateDeviceRecursive(const char *device,
}
VIR_FREE(devTmp);
VIR_FREE(target);
- VIR_STEAL_PTR(target, tmp);
+ target = g_steal_pointer(&tmp);
}
if (qemuDomainCreateDeviceRecursive(target, data,
@@ -14157,7 +14157,7 @@ qemuDomainAttachDeviceMknodRecursive(virQEMUDriverPtr driver,
}
VIR_FREE(fileTmp);
VIR_FREE(target);
- VIR_STEAL_PTR(target, tmp);
+ target = g_steal_pointer(&tmp);
}
data.target = target;
@@ -14944,12 +14944,12 @@ qemuDomainFixupCPUs(virDomainObjPtr vm,
if (fixedCPU) {
virCPUDefFree(vm->def->cpu);
- VIR_STEAL_PTR(vm->def->cpu, fixedCPU);
+ vm->def->cpu = g_steal_pointer(&fixedCPU);
}
if (fixedOrig) {
virCPUDefFree(*origCPU);
- VIR_STEAL_PTR(*origCPU, fixedOrig);
+ *origCPU = g_steal_pointer(&fixedOrig);
}
ret = 0;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 86d7647628..2e422b5882 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -2903,7 +2903,7 @@ virQEMUSaveDataNew(char *domXML,
if (VIR_ALLOC(data) < 0)
return NULL;
- VIR_STEAL_PTR(data->xml, domXML);
+ data->xml = g_steal_pointer(&domXML);
if (cookieObj &&
!(data->cookie = virSaveCookieFormat((virObjectPtr) cookieObj,
@@ -5732,7 +5732,7 @@ qemuDomainGetIOThreadsLive(virQEMUDriverPtr driver,
virBitmapFree(map);
}
- VIR_STEAL_PTR(*info, info_ret);
+ *info = g_steal_pointer(&info_ret);
ret = niothreads;
endjob:
@@ -6745,9 +6745,9 @@ qemuDomainSaveImageUpdateDef(virQEMUDriverPtr driver,
virFreeError(err);
/* use the user provided XML */
- VIR_STEAL_PTR(ret, newdef);
+ ret = g_steal_pointer(&newdef);
} else {
- VIR_STEAL_PTR(ret, newdef_migr);
+ ret = g_steal_pointer(&newdef_migr);
}
cleanup:
@@ -8425,7 +8425,7 @@ qemuDomainAttachDeviceConfig(virDomainDefPtr vmdef,
_("domain already has a watchdog"));
return -1;
}
- VIR_STEAL_PTR(vmdef->watchdog, dev->data.watchdog);
+ vmdef->watchdog = g_steal_pointer(&dev->data.watchdog);
break;
case VIR_DOMAIN_DEVICE_INPUT:
@@ -8439,7 +8439,7 @@ qemuDomainAttachDeviceConfig(virDomainDefPtr vmdef,
_("domain already has a vsock device"));
return -1;
}
- VIR_STEAL_PTR(vmdef->vsock, dev->data.vsock);
+ vmdef->vsock = g_steal_pointer(&dev->data.vsock);
break;
case VIR_DOMAIN_DEVICE_SOUND:
@@ -12765,7 +12765,7 @@ qemuDomainMigratePerform(virDomainPtr dom,
goto cleanup;
if (flags & VIR_MIGRATE_PEER2PEER)
- VIR_STEAL_PTR(dconnuri, uri);
+ dconnuri = g_steal_pointer(&uri);
/* Do not output cookies in v2 protocol, since the cookie
* length was not sufficiently large, causing failures
@@ -13819,8 +13819,8 @@ qemuConnectStealCPUModelFromInfo(virCPUDefPtr dst,
virCPUDefFreeModel(dst);
- VIR_STEAL_PTR(info, *src);
- VIR_STEAL_PTR(dst->model, info->name);
+ info = g_steal_pointer(&*src);
+ dst->model = g_steal_pointer(&info->name);
for (i = 0; i < info->nprops; i++) {
char *name = info->props[i].name;
@@ -13888,7 +13888,7 @@ qemuConnectCPUModelBaseline(virQEMUCapsPtr qemuCaps,
goto cleanup;
}
- VIR_STEAL_PTR(ret, baseline);
+ ret = g_steal_pointer(&baseline);
cleanup:
qemuProcessQMPFree(proc);
@@ -15506,7 +15506,7 @@ qemuDomainSnapshotDiskPrepareOne(virQEMUDriverPtr driver,
return -1;
if (backingStoreStr != NULL) {
if (virStorageIsRelative(backingStoreStr))
- VIR_STEAL_PTR(dd->relPath, backingStoreStr);
+ dd->relPath = g_steal_pointer(&backingStoreStr);
else
VIR_FREE(backingStoreStr);
}
@@ -15609,7 +15609,7 @@ qemuDomainSnapshotDiskPrepare(virQEMUDriverPtr driver,
goto cleanup;
}
- VIR_STEAL_PTR(*rdata, data);
+ *rdata = g_steal_pointer(&data);
*rndata = ndata;
ret = 0;
@@ -15662,17 +15662,17 @@ qemuDomainSnapshotDiskUpdateSource(virQEMUDriverPtr driver,
/* the old disk image is now readonly */
dd->disk->src->readonly = true;
- VIR_STEAL_PTR(dd->disk->src->relPath, dd->relPath);
- VIR_STEAL_PTR(dd->src->backingStore, dd->disk->src);
- VIR_STEAL_PTR(dd->disk->src, dd->src);
+ dd->disk->src->relPath = g_steal_pointer(&dd->relPath);
+ dd->src->backingStore = g_steal_pointer(&dd->disk->src);
+ dd->disk->src = g_steal_pointer(&dd->src);
/* fix numbering of disks */
if (!blockdev)
qemuDomainSnapshotDiskUpdateSourceRenumber(dd->disk->src);
if (dd->persistdisk) {
- VIR_STEAL_PTR(dd->persistsrc->backingStore, dd->persistdisk->src);
- VIR_STEAL_PTR(dd->persistdisk->src, dd->persistsrc);
+ dd->persistsrc->backingStore =
g_steal_pointer(&dd->persistdisk->src);
+ dd->persistdisk->src = g_steal_pointer(&dd->persistsrc);
}
}
@@ -16765,7 +16765,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
if (!inactiveConfig)
goto endjob;
} else {
- VIR_STEAL_PTR(inactiveConfig, config);
+ inactiveConfig = g_steal_pointer(&config);
}
}
@@ -16872,7 +16872,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
}
if (config) {
virCPUDefFree(priv->origCPU);
- VIR_STEAL_PTR(priv->origCPU, origCPU);
+ priv->origCPU = g_steal_pointer(&origCPU);
}
if (cookie && !cookie->slirpHelper)
@@ -18462,7 +18462,7 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm,
/* Update vm in place to match changes. */
need_unlink = false;
virStorageFileDeinit(mirror);
- VIR_STEAL_PTR(disk->mirror, mirror);
+ disk->mirror = g_steal_pointer(&mirror);
disk->mirrorJob = VIR_DOMAIN_BLOCK_JOB_TYPE_COPY;
qemuBlockJobStarted(job, vm);
@@ -18634,7 +18634,7 @@ qemuDomainBlockCopy(virDomainPtr dom, const char *disk, const char
*destxml,
VIR_DOMAIN_DEF_PARSE_DISK_SOURCE)))
goto cleanup;
- VIR_STEAL_PTR(dest, diskdef->src);
+ dest = g_steal_pointer(&diskdef->src);
ret = qemuDomainBlockCopyCommon(vm, dom->conn, disk, dest, bandwidth,
granularity, buf_size, flags, false);
@@ -18890,7 +18890,7 @@ qemuDomainBlockCommit(virDomainPtr dom,
}
if (mirror) {
- VIR_STEAL_PTR(disk->mirror, mirror);
+ disk->mirror = g_steal_pointer(&mirror);
disk->mirrorJob = VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT;
}
qemuBlockJobStarted(job, vm);
@@ -21608,7 +21608,7 @@ qemuDomainGetStats(virConnectPtr conn,
return -1;
tmp->nparams = virTypedParamListStealParams(params, &tmp->params);
- VIR_STEAL_PTR(*record, tmp);
+ *record = g_steal_pointer(&tmp);
return 0;
}
@@ -21916,7 +21916,7 @@ qemuGetDHCPInterfaces(virDomainPtr dom,
VIR_FREE(leases);
}
- VIR_STEAL_PTR(*ifaces, ifaces_ret);
+ *ifaces = g_steal_pointer(&ifaces_ret);
rv = ifaces_count;
cleanup:
@@ -21984,7 +21984,7 @@ qemuARPGetInterfaces(virDomainObjPtr vm,
}
}
- VIR_STEAL_PTR(*ifaces, ifaces_ret);
+ *ifaces = g_steal_pointer(&ifaces_ret);
ret = ifaces_count;
cleanup:
@@ -22700,7 +22700,7 @@ qemuGetSEVInfoToParams(virQEMUCapsPtr qemuCaps,
sev->reduced_phys_bits) < 0)
goto cleanup;
- VIR_STEAL_PTR(*params, sevParams);
+ *params = g_steal_pointer(&sevParams);
*nparams = n;
return 0;
diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c
index 313c909aed..f614be6d14 100644
--- a/src/qemu/qemu_firmware.c
+++ b/src/qemu/qemu_firmware.c
@@ -325,7 +325,7 @@ qemuFirmwareInterfaceParse(const char *path,
VIR_DEBUG("firmware description path '%s' supported interfaces:
%s",
path, NULLSTR_MINUS(virBufferCurrentContent(&buf)));
- VIR_STEAL_PTR(fw->interfaces, interfaces);
+ fw->interfaces = g_steal_pointer(&interfaces);
fw->ninterfaces = ninterfaces;
return 0;
}
@@ -553,10 +553,10 @@ qemuFirmwareTargetParse(const char *path,
VIR_APPEND_ELEMENT_INPLACE(t->machines, t->nmachines, machineStr);
}
- VIR_STEAL_PTR(targets[i], t);
+ targets[i] = g_steal_pointer(&t);
}
- VIR_STEAL_PTR(fw->targets, targets);
+ fw->targets = g_steal_pointer(&targets);
fw->ntargets = ntargets;
ntargets = 0;
ret = 0;
@@ -606,7 +606,7 @@ qemuFirmwareFeatureParse(const char *path,
features[i] = tmp;
}
- VIR_STEAL_PTR(fw->features, features);
+ fw->features = g_steal_pointer(&features);
fw->nfeatures = nfeatures;
return 0;
}
@@ -648,7 +648,7 @@ qemuFirmwareParse(const char *path)
if (qemuFirmwareFeatureParse(path, doc, fw) < 0)
return NULL;
- VIR_STEAL_PTR(ret, fw);
+ ret = g_steal_pointer(&fw);
return ret;
}
@@ -698,7 +698,7 @@ qemuFirmwareFlashFileFormat(qemuFirmwareFlashFile flash)
flash.format) < 0)
return NULL;
- VIR_STEAL_PTR(ret, json);
+ ret = g_steal_pointer(&json);
return ret;
}
@@ -1203,9 +1203,9 @@ qemuFirmwareFetchParsedConfigs(bool privileged,
goto error;
}
- VIR_STEAL_PTR(*firmwaresRet, firmwares);
+ *firmwaresRet = g_steal_pointer(&firmwares);
if (pathsRet)
- VIR_STEAL_PTR(*pathsRet, paths);
+ *pathsRet = g_steal_pointer(&paths);
return npaths;
error:
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index df6f3f9b55..bf301919cc 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -3274,7 +3274,7 @@ qemuDomainAttachVsockDevice(virQEMUDriverPtr driver,
goto cleanup;
}
- VIR_STEAL_PTR(vm->def->vsock, vsock);
+ vm->def->vsock = g_steal_pointer(&vsock);
ret = 0;
@@ -6444,7 +6444,7 @@ qemuDomainFilterHotplugVcpuEntities(virDomainDefPtr def,
}
}
- VIR_STEAL_PTR(ret, map);
+ ret = g_steal_pointer(&map);
cleanup:
virBitmapFree(map);
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index b34e47e473..882c6810a0 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -854,7 +854,7 @@ qemuMigrationSrcNBDStorageCopyBlockdev(virQEMUDriverPtr driver,
if (qemuDomainObjExitMonitor(driver, vm) < 0 || mon_ret < 0)
return -1;
- VIR_STEAL_PTR(diskPriv->migrSource, copysrc);
+ diskPriv->migrSource = g_steal_pointer(©src);
return 0;
}
@@ -3671,7 +3671,7 @@ qemuMigrationSrcRun(virQEMUDriverPtr driver,
if (iothread) {
qemuMigrationIOThreadPtr io;
- VIR_STEAL_PTR(io, iothread);
+ io = g_steal_pointer(&iothread);
if (qemuMigrationSrcStopTunnel(io, false) < 0)
goto error;
}
@@ -4150,7 +4150,7 @@ qemuMigrationSrcPerformPeer2Peer3(virQEMUDriverPtr driver,
VIR_MIGRATE_AUTO_CONVERGE);
VIR_DEBUG("Prepare3 %p", dconn);
- VIR_STEAL_PTR(cookiein, cookieout);
+ cookiein = g_steal_pointer(&cookieout);
cookieinlen = cookieoutlen;
cookieoutlen = 0;
if (flags & VIR_MIGRATE_TUNNELLED) {
@@ -4218,7 +4218,7 @@ qemuMigrationSrcPerformPeer2Peer3(virQEMUDriverPtr driver,
VIR_DEBUG("Perform3 %p uri=%s", sconn, NULLSTR(uri));
qemuMigrationJobSetPhase(driver, vm, QEMU_MIGRATION_PHASE_PERFORM3);
VIR_FREE(cookiein);
- VIR_STEAL_PTR(cookiein, cookieout);
+ cookiein = g_steal_pointer(&cookieout);
cookieinlen = cookieoutlen;
cookieoutlen = 0;
if (flags & VIR_MIGRATE_TUNNELLED) {
@@ -4259,7 +4259,7 @@ qemuMigrationSrcPerformPeer2Peer3(virQEMUDriverPtr driver,
*/
VIR_DEBUG("Finish3 %p ret=%d", dconn, ret);
VIR_FREE(cookiein);
- VIR_STEAL_PTR(cookiein, cookieout);
+ cookiein = g_steal_pointer(&cookieout);
cookieinlen = cookieoutlen;
cookieoutlen = 0;
@@ -4339,7 +4339,7 @@ qemuMigrationSrcPerformPeer2Peer3(virQEMUDriverPtr driver,
*/
VIR_DEBUG("Confirm3 %p cancelled=%d vm=%p", sconn, cancelled, vm);
VIR_FREE(cookiein);
- VIR_STEAL_PTR(cookiein, cookieout);
+ cookiein = g_steal_pointer(&cookieout);
cookieinlen = cookieoutlen;
cookieoutlen = 0;
ret = qemuMigrationSrcConfirmPhase(driver, vm,
@@ -5170,7 +5170,7 @@ qemuMigrationDstFinish(virQEMUDriverPtr driver,
if (dom) {
if (jobInfo) {
- VIR_STEAL_PTR(priv->job.completed, jobInfo);
+ priv->job.completed = g_steal_pointer(&jobInfo);
priv->job.completed->status = QEMU_DOMAIN_JOB_STATUS_COMPLETED;
priv->job.completed->statsType = QEMU_DOMAIN_JOB_STATS_TYPE_MIGRATION;
}
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index e7556889cc..244ad4fdf3 100644
--- a/src/qemu/qemu_migration_cookie.c
+++ b/src/qemu/qemu_migration_cookie.c
@@ -1183,7 +1183,7 @@ qemuMigrationCookieCapsXMLParse(xmlXPathContextPtr ctxt)
VIR_FREE(automatic);
}
- VIR_STEAL_PTR(ret, caps);
+ ret = g_steal_pointer(&caps);
cleanup:
qemuMigrationCookieCapsFree(caps);
diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c
index 85fa8f8de5..159205527e 100644
--- a/src/qemu/qemu_migration_params.c
+++ b/src/qemu/qemu_migration_params.c
@@ -1335,7 +1335,7 @@ qemuMigrationParamsParse(xmlXPathContextPtr ctxt,
break;
case QEMU_MIGRATION_PARAM_TYPE_STRING:
- VIR_STEAL_PTR(pv->value.s, value);
+ pv->value.s = g_steal_pointer(&value);
break;
}
@@ -1351,7 +1351,7 @@ qemuMigrationParamsParse(xmlXPathContextPtr ctxt,
VIR_FREE(value);
}
- VIR_STEAL_PTR(*migParams, params);
+ *migParams = g_steal_pointer(¶ms);
ret = 0;
cleanup:
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 33dae75e41..333acbe9b9 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -1826,10 +1826,10 @@ qemuMonitorGetCPUInfoHotplug(struct
qemuMonitorQueryHotpluggableCpusEntry *hotpl
vcpus[mastervcpu].thread_id = hotplugvcpus[i].thread_id;
vcpus[mastervcpu].node_id = hotplugvcpus[i].node_id;
vcpus[mastervcpu].vcpus = hotplugvcpus[i].vcpus;
- VIR_STEAL_PTR(vcpus[mastervcpu].qom_path, hotplugvcpus[i].qom_path);
- VIR_STEAL_PTR(vcpus[mastervcpu].alias, hotplugvcpus[i].alias);
- VIR_STEAL_PTR(vcpus[mastervcpu].type, hotplugvcpus[i].type);
- VIR_STEAL_PTR(vcpus[mastervcpu].props, hotplugvcpus[i].props);
+ vcpus[mastervcpu].qom_path = g_steal_pointer(&hotplugvcpus[i].qom_path);
+ vcpus[mastervcpu].alias = g_steal_pointer(&hotplugvcpus[i].alias);
+ vcpus[mastervcpu].type = g_steal_pointer(&hotplugvcpus[i].type);
+ vcpus[mastervcpu].props = g_steal_pointer(&hotplugvcpus[i].props);
vcpus[mastervcpu].id = hotplugvcpus[i].enable_id;
/* copy state information to slave vcpus */
@@ -1922,7 +1922,7 @@ qemuMonitorGetCPUInfo(qemuMonitorPtr mon,
if (rc < 0) {
if (!hotplug && rc == -2) {
- VIR_STEAL_PTR(*vcpus, info);
+ *vcpus = g_steal_pointer(&info);
ret = 0;
}
@@ -1939,7 +1939,7 @@ qemuMonitorGetCPUInfo(qemuMonitorPtr mon,
qemuMonitorGetCPUInfoLegacy(cpuentries, ncpuentries, info, maxvcpus);
}
- VIR_STEAL_PTR(*vcpus, info);
+ *vcpus = g_steal_pointer(&info);
ret = 0;
cleanup:
@@ -2997,7 +2997,7 @@ qemuMonitorAddObject(qemuMonitorPtr mon,
*props = NULL;
if (alias)
- VIR_STEAL_PTR(*alias, tmp);
+ *alias = g_steal_pointer(&tmp);
cleanup:
VIR_FREE(tmp);
@@ -4447,7 +4447,7 @@ qemuMonitorGetPRManagerInfo(qemuMonitorPtr mon,
if (qemuMonitorJSONGetPRManagerInfo(mon, info) < 0)
goto cleanup;
- VIR_STEAL_PTR(*retinfo, info);
+ *retinfo = g_steal_pointer(&info);
ret = 0;
cleanup:
virHashFree(info);
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 70edd04773..02308dffe6 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -1940,7 +1940,7 @@ qemuMonitorJSONExtractCPUInfo(virJSONValuePtr data,
qemuMonitorJSONExtractCPUS390Info(entry, cpus + i);
}
- VIR_STEAL_PTR(*entries, cpus);
+ *entries = g_steal_pointer(&cpus);
*nentries = ncpus;
ret = 0;
@@ -5791,7 +5791,7 @@ qemuMonitorJSONParseCPUModel(const char *cpu_name,
goto cleanup;
}
- VIR_STEAL_PTR(*model_info, machine_model);
+ *model_info = g_steal_pointer(&machine_model);
ret = 0;
cleanup:
@@ -6508,7 +6508,7 @@ qemuMonitorJSONGetStringListProperty(qemuMonitorPtr mon,
return -1;
}
- VIR_STEAL_PTR(*strList, list);
+ *strList = g_steal_pointer(&list);
return n;
}
@@ -7021,7 +7021,7 @@ qemuMonitorJSONGetSEVCapabilities(qemuMonitorPtr mon,
capability->cbitpos = cbitpos;
capability->reduced_phys_bits = reduced_phys_bits;
- VIR_STEAL_PTR(*capabilities, capability);
+ *capabilities = g_steal_pointer(&capability);
ret = 1;
cleanup:
virJSONValueFree(cmd);
@@ -7867,9 +7867,9 @@ qemuMonitorJSONGetGuestCPU(qemuMonitorPtr mon,
qemuMonitorJSONGetCPUDataDisabled(mon, translate, opaque, cpuDisabled) < 0)
goto cleanup;
- VIR_STEAL_PTR(*enabled, cpuEnabled);
+ *enabled = g_steal_pointer(&cpuEnabled);
if (disabled)
- VIR_STEAL_PTR(*disabled, cpuDisabled);
+ *disabled = g_steal_pointer(&cpuDisabled);
ret = 0;
@@ -8571,7 +8571,7 @@ qemuMonitorJSONGetHotpluggableCPUs(qemuMonitorPtr mon,
qsort(info, ninfo, sizeof(*info), qemuMonitorQueryHotpluggableCpusEntrySort);
- VIR_STEAL_PTR(*entries, info);
+ *entries = g_steal_pointer(&info);
*nentries = ninfo;
ret = 0;
@@ -9312,7 +9312,7 @@ qemuMonitorJSONGetJobInfoOne(virJSONValuePtr data)
VIR_STRDUP(job->error, errmsg) < 0)
return NULL;
- VIR_STEAL_PTR(ret, job);
+ ret = g_steal_pointer(&job);
return ret;
}
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index b2d07cf279..724e950101 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -1852,7 +1852,7 @@ qemuProcessHandleRdmaGidStatusChanged(qemuMonitorPtr mon
G_GNUC_UNUSED,
processEvent->eventType = QEMU_PROCESS_EVENT_RDMA_GID_STATUS_CHANGED;
processEvent->vm = virObjectRef(vm);
- VIR_STEAL_PTR(processEvent->data, info);
+ processEvent->data = g_steal_pointer(&info);
if (virThreadPoolSendJob(driver->workerPool, 0, processEvent) < 0) {
qemuProcessEventFree(processEvent);
@@ -4313,7 +4313,7 @@ qemuProcessUpdateLiveGuestCPU(virDomainObjPtr vm,
* get the original CPU via migration, restore, or snapshot revert.
*/
if (!priv->origCPU && !virCPUDefIsEqual(def->cpu, orig, false))
- VIR_STEAL_PTR(priv->origCPU, orig);
+ priv->origCPU = g_steal_pointer(&orig);
def->cpu->check = VIR_CPU_CHECK_FULL;
}
@@ -5680,7 +5680,7 @@ qemuProcessInit(virQEMUDriverPtr driver,
if (qemuDomainSetPrivatePaths(driver, vm) < 0)
goto stop;
- VIR_STEAL_PTR(priv->origCPU, origCPU);
+ priv->origCPU = g_steal_pointer(&origCPU);
}
ret = 0;
@@ -6187,7 +6187,7 @@ qemuProcessPrepareDomainNUMAPlacement(virDomainObjPtr vm,
virBitmapIntersect(numadNodeset, hostMemoryNodeset);
- VIR_STEAL_PTR(priv->autoNodeset, numadNodeset);
+ priv->autoNodeset = g_steal_pointer(&numadNodeset);
ret = 0;
@@ -8488,7 +8488,7 @@ qemuProcessQMPNew(const char *binary,
proc->runGid = runGid;
proc->forceTCG = forceTCG;
- VIR_STEAL_PTR(ret, proc);
+ ret = g_steal_pointer(&proc);
cleanup:
qemuProcessQMPFree(proc);
diff --git a/src/qemu/qemu_vhost_user.c b/src/qemu/qemu_vhost_user.c
index 5bab7ff5fa..dfef6f20a3 100644
--- a/src/qemu/qemu_vhost_user.c
+++ b/src/qemu/qemu_vhost_user.c
@@ -206,7 +206,7 @@ qemuVhostUserParse(const char *path)
if (qemuVhostUserBinaryParse(path, doc, vu) < 0)
return NULL;
- VIR_STEAL_PTR(ret, vu);
+ ret = g_steal_pointer(&vu);
return ret;
}
@@ -264,9 +264,9 @@ qemuVhostUserFetchParsedConfigs(bool privileged,
goto error;
}
- VIR_STEAL_PTR(*vhostuserRet, vus);
+ *vhostuserRet = g_steal_pointer(&vus);
if (pathsRet)
- VIR_STEAL_PTR(*pathsRet, paths);
+ *pathsRet = g_steal_pointer(&paths);
return npaths;
error:
@@ -313,7 +313,7 @@ qemuVhostUserGPUFillCapabilities(qemuVhostUserPtr vu,
features[i] = tmp;
}
- VIR_STEAL_PTR(gpu->features, features);
+ gpu->features = g_steal_pointer(&features);
gpu->nfeatures = nfeatures;
return 0;
--
2.19.2