From bf26dd222fe73f2610729a46922a2d7cb37ca9c9 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 17 May 2018 16:26:09 +0200 Subject: [PATCH] qemu: Rename virQEMUBuildObjectCommandlineFromJSON MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit s/virQEMUBuildObjectCommandlineFromJSON/virQEMUBuildObjectCommandlineFromJSONType/ The function adds the object of a certain type. Change the name so that we make room for the generic function. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- src/libvirt_private.syms | 2 +- src/qemu/qemu_command.c | 32 ++++++++++++++++---------------- src/util/virqemu.c | 6 +++--- src/util/virqemu.h | 6 +++--- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index b2decc12fb..23d5591093 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2601,7 +2601,7 @@ virQEMUBuildCommandLineJSON; virQEMUBuildCommandLineJSONArrayBitmap; virQEMUBuildCommandLineJSONArrayNumbered; virQEMUBuildDriveCommandlineFromJSON; -virQEMUBuildObjectCommandlineFromJSON; +virQEMUBuildObjectCommandlineFromJSONType; virQEMUBuildQemuImgKeySecretOpts; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 889840a1ae..a44f1fce77 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -550,9 +550,9 @@ qemuBuildObjectSecretCommandLine(virCommandPtr cmd, if (qemuBuildSecretInfoProps(secinfo, &props) < 0) return -1; - if (!(tmp = virQEMUBuildObjectCommandlineFromJSON("secret", - secinfo->s.aes.alias, - props))) + if (!(tmp = virQEMUBuildObjectCommandlineFromJSONType("secret", + secinfo->s.aes.alias, + props))) goto cleanup; virCommandAddArgList(cmd, "-object", tmp, NULL); @@ -750,8 +750,8 @@ qemuBuildTLSx509CommandLine(virCommandPtr cmd, qemuCaps, &props) < 0) goto cleanup; - if (!(tmp = virQEMUBuildObjectCommandlineFromJSON("tls-creds-x509", - alias, props))) + if (!(tmp = virQEMUBuildObjectCommandlineFromJSONType("tls-creds-x509", + alias, props))) goto cleanup; virCommandAddArgList(cmd, "-object", tmp, NULL); @@ -3224,9 +3224,9 @@ qemuBuildMemoryCellBackendStr(virDomainDefPtr def, def, &mem, priv->autoNodeset, false)) < 0) goto cleanup; - if (!(*backendStr = virQEMUBuildObjectCommandlineFromJSON(backendType, - alias, - props))) + if (!(*backendStr = virQEMUBuildObjectCommandlineFromJSONType(backendType, + alias, + props))) goto cleanup; ret = rc; @@ -3263,7 +3263,7 @@ qemuBuildMemoryDimmBackendStr(virDomainMemoryDefPtr mem, def, mem, priv->autoNodeset, true) < 0) goto cleanup; - ret = virQEMUBuildObjectCommandlineFromJSON(backendType, alias, props); + ret = virQEMUBuildObjectCommandlineFromJSONType(backendType, alias, props); cleanup: VIR_FREE(alias); @@ -5560,7 +5560,7 @@ qemuBuildRNGBackendStr(virDomainRNGDefPtr rng, if (qemuBuildRNGBackendProps(rng, qemuCaps, &type, &props) < 0) goto cleanup; - ret = virQEMUBuildObjectCommandlineFromJSON(type, alias, props); + ret = virQEMUBuildObjectCommandlineFromJSONType(type, alias, props); cleanup: VIR_FREE(alias); @@ -8826,9 +8826,9 @@ qemuBuildShmemBackendMemStr(virDomainShmemDefPtr shmem) if (virAsprintf(&alias, "shmmem-%s", shmem->info.alias) < 0) goto cleanup; - ret = virQEMUBuildObjectCommandlineFromJSON("memory-backend-file", - alias, - props); + ret = virQEMUBuildObjectCommandlineFromJSONType("memory-backend-file", + alias, + props); cleanup: VIR_FREE(alias); virJSONValueFree(props); @@ -9766,9 +9766,9 @@ qemuBuildMasterPRCommandLine(virCommandPtr cmd, if (qemuBuildPRManagerInfoProps(disk, &props) < 0) goto cleanup; - if (!(tmp = virQEMUBuildObjectCommandlineFromJSON("pr-manager-helper", - disk->src->pr->mgralias, - props))) + if (!(tmp = virQEMUBuildObjectCommandlineFromJSONType("pr-manager-helper", + disk->src->pr->mgralias, + props))) goto cleanup; virJSONValueFree(props); props = NULL; diff --git a/src/util/virqemu.c b/src/util/virqemu.c index 04cd71605e..fc4727e126 100644 --- a/src/util/virqemu.c +++ b/src/util/virqemu.c @@ -242,9 +242,9 @@ virQEMUBuildCommandLineJSON(virJSONValuePtr value, char * -virQEMUBuildObjectCommandlineFromJSON(const char *type, - const char *alias, - virJSONValuePtr props) +virQEMUBuildObjectCommandlineFromJSONType(const char *type, + const char *alias, + virJSONValuePtr props) { virBuffer buf = VIR_BUFFER_INITIALIZER; char *ret = NULL; diff --git a/src/util/virqemu.h b/src/util/virqemu.h index 2599481753..0ef8e8d31d 100644 --- a/src/util/virqemu.h +++ b/src/util/virqemu.h @@ -43,9 +43,9 @@ int virQEMUBuildCommandLineJSON(virJSONValuePtr value, virBufferPtr buf, virQEMUBuildCommandLineJSONArrayFormatFunc array); -char *virQEMUBuildObjectCommandlineFromJSON(const char *type, - const char *alias, - virJSONValuePtr props); +char *virQEMUBuildObjectCommandlineFromJSONType(const char *type, + const char *alias, + virJSONValuePtr props); char *virQEMUBuildDriveCommandlineFromJSON(virJSONValuePtr src);