From nobody Wed May 14 06:45:32 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1527700020276286.64305323025565; Wed, 30 May 2018 10:07:00 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5F581A4E59; Wed, 30 May 2018 17:06:58 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 118D39FA48; Wed, 30 May 2018 17:06:58 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6F97F1800C9D; Wed, 30 May 2018 17:06:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4UH6q3f007294 for ; Wed, 30 May 2018 13:06:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 41CE82026DEF; Wed, 30 May 2018 17:06:52 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id DB3CA2026DFD for ; Wed, 30 May 2018 17:06:51 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 30 May 2018 19:06:27 +0200 Message-Id: <8225a68887ef824b26546b4e3b7029d4e67a11d4.1527699462.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 03/13] qemu: Rename virQEMUBuildObjectCommandlineFromJSON X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 30 May 2018 17:06:59 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" s/virQEMUBuildObjectCommandlineFromJSON/virQEMUBuildObjectCommandlineFromJS= ONType/ 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=EF=BF=BDn 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 6001635916..e2a9916326 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2599,7 +2599,7 @@ virQEMUBuildCommandLineJSON; virQEMUBuildCommandLineJSONArrayBitmap; virQEMUBuildCommandLineJSONArrayNumbered; virQEMUBuildDriveCommandlineFromJSON; -virQEMUBuildObjectCommandlineFromJSON; +virQEMUBuildObjectCommandlineFromJSONType; virQEMUBuildQemuImgKeySecretOpts; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 39dcd1cfba..5b0e21a425 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 =3D virQEMUBuildObjectCommandlineFromJSON("secret", - secinfo->s.aes.alias, - props))) + if (!(tmp =3D virQEMUBuildObjectCommandlineFromJSONType("secret", + secinfo->s.aes.a= lias, + props))) goto cleanup; virCommandAddArgList(cmd, "-object", tmp, NULL); @@ -750,8 +750,8 @@ qemuBuildTLSx509CommandLine(virCommandPtr cmd, qemuCaps, &props) < 0) goto cleanup; - if (!(tmp =3D virQEMUBuildObjectCommandlineFromJSON("tls-creds-x509", - alias, props))) + if (!(tmp =3D virQEMUBuildObjectCommandlineFromJSONType("tls-creds-x50= 9", + alias, props))) goto cleanup; virCommandAddArgList(cmd, "-object", tmp, NULL); @@ -3229,9 +3229,9 @@ qemuBuildMemoryCellBackendStr(virDomainDefPtr def, def, &mem, priv->autoNodeset, fa= lse)) < 0) goto cleanup; - if (!(*backendStr =3D virQEMUBuildObjectCommandlineFromJSON(backendTyp= e, - alias, - props))) + if (!(*backendStr =3D virQEMUBuildObjectCommandlineFromJSONType(backen= dType, + alias, + props))) goto cleanup; ret =3D rc; @@ -3268,7 +3268,7 @@ qemuBuildMemoryDimmBackendStr(virDomainMemoryDefPtr m= em, def, mem, priv->autoNodeset, true) < 0) goto cleanup; - ret =3D virQEMUBuildObjectCommandlineFromJSON(backendType, alias, prop= s); + ret =3D virQEMUBuildObjectCommandlineFromJSONType(backendType, alias, = props); cleanup: VIR_FREE(alias); @@ -5565,7 +5565,7 @@ qemuBuildRNGBackendStr(virDomainRNGDefPtr rng, if (qemuBuildRNGBackendProps(rng, qemuCaps, &type, &props) < 0) goto cleanup; - ret =3D virQEMUBuildObjectCommandlineFromJSON(type, alias, props); + ret =3D virQEMUBuildObjectCommandlineFromJSONType(type, alias, props); cleanup: VIR_FREE(alias); @@ -8831,9 +8831,9 @@ qemuBuildShmemBackendMemStr(virDomainShmemDefPtr shme= m) if (virAsprintf(&alias, "shmmem-%s", shmem->info.alias) < 0) goto cleanup; - ret =3D virQEMUBuildObjectCommandlineFromJSON("memory-backend-file", - alias, - props); + ret =3D virQEMUBuildObjectCommandlineFromJSONType("memory-backend-file= ", + alias, + props); cleanup: VIR_FREE(alias); virJSONValueFree(props); @@ -9771,9 +9771,9 @@ qemuBuildMasterPRCommandLine(virCommandPtr cmd, if (qemuBuildPRManagerInfoProps(disk, &props) < 0) goto cleanup; - if (!(tmp =3D virQEMUBuildObjectCommandlineFromJSON("pr-manager-he= lper", - disk->src->pr->m= gralias, - props))) + if (!(tmp =3D virQEMUBuildObjectCommandlineFromJSONType("pr-manage= r-helper", + disk->src->p= r->mgralias, + props))) goto cleanup; virJSONValueFree(props); props =3D 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 =3D VIR_BUFFER_INITIALIZER; char *ret =3D 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); --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list