From nobody Wed May 14 17:33:09 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 1521743606280875.5426683935185; Thu, 22 Mar 2018 11:33:26 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0545612E37B; Thu, 22 Mar 2018 18:33:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C2A9A7ADBF; Thu, 22 Mar 2018 18:33:24 +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 855544CA9F; Thu, 22 Mar 2018 18:33:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2MIVtiI015609 for ; Thu, 22 Mar 2018 14:31:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 50BF18442D; Thu, 22 Mar 2018 18:31:55 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id CDF1284436; Thu, 22 Mar 2018 18:31:54 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 22 Mar 2018 19:31:40 +0100 Message-Id: <75c47ad5bfe851f14615180cd87942ab26d5f6a8.1521743167.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 03/11] qemu: qapi: Fix naming of moved functions 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.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 22 Mar 2018 18:33:25 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Change the prefix of the functions to 'virQEMUQapi' and rename the two public APIs so that the verb is put last. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 4 ++-- src/qemu/qemu_qapi.c | 36 ++++++++++++++++++------------------ src/qemu/qemu_qapi.h | 10 +++++----- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 7801c9b33c..a6170c66f2 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1833,7 +1833,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjec= tPropsIntelIOMMU[] =3D { { "device-iotlb", QEMU_CAPS_INTEL_IOMMU_DEVICE_IOTLB }, }; -/* see documentation for virQEMUCapsQMPSchemaGetByPath for the query forma= t */ +/* see documentation for virQEMUQapiSchemaPathGet for the query format */ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] =3D { { "blockdev-add/arg-type/options/+gluster/debug-level", QEMU_CAPS_GLUS= TER_DEBUG_LEVEL}, { "blockdev-add/arg-type/+gluster/debug", QEMU_CAPS_GLUSTER_DEBUG_LEVE= L}, @@ -4579,7 +4579,7 @@ virQEMUCapsProbeQMPSchemaCapabilities(virQEMUCapsPtr = qemuCaps, for (i =3D 0; i < ARRAY_CARDINALITY(virQEMUCapsQMPSchemaQueries); i++)= { entry =3D virQEMUCapsQMPSchemaQueries + i; - if (virQEMUCapsQMPSchemaQueryPath(entry->value, schema)) + if (virQEMUQapiSchemaPathExists(entry->value, schema)) virQEMUCapsSet(qemuCaps, entry->flag); } diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 2646afeee2..0a18764ac1 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -31,7 +31,7 @@ VIR_LOG_INIT("qemu.qemu_qapi"); /** - * virQEMUCapsQMPSchemaObjectGetType: + * virQEMUQapiSchemaObjectGetType: * @field: name of the object containing the requested type * @name: name of the requested type * @namefield: name of the object property holding @name @@ -40,10 +40,10 @@ VIR_LOG_INIT("qemu.qemu_qapi"); * member. Returns the type string on success or NULL on error. */ static const char * -virQEMUCapsQMPSchemaObjectGetType(const char *field, - const char *name, - const char *namefield, - virJSONValuePtr elem) +virQEMUQapiSchemaObjectGetType(const char *field, + const char *name, + const char *namefield, + virJSONValuePtr elem) { virJSONValuePtr arr; virJSONValuePtr cur; @@ -69,9 +69,9 @@ virQEMUCapsQMPSchemaObjectGetType(const char *field, static virJSONValuePtr -virQEMUCapsQMPSchemaTraverse(const char *baseName, - char **query, - virHashTablePtr schema) +virQEMUQapiSchemaTraverse(const char *baseName, + char **query, + virHashTablePtr schema) { virJSONValuePtr base; const char *metatype; @@ -94,11 +94,11 @@ virQEMUCapsQMPSchemaTraverse(const char *baseName, continue; } else if (STREQ(metatype, "object")) { if (**query =3D=3D '+') - baseName =3D virQEMUCapsQMPSchemaObjectGetType("variants", + baseName =3D virQEMUQapiSchemaObjectGetType("variants", *query + 1, "case", base); else - baseName =3D virQEMUCapsQMPSchemaObjectGetType("members", + baseName =3D virQEMUQapiSchemaObjectGetType("members", *query, "name", base); @@ -121,7 +121,7 @@ virQEMUCapsQMPSchemaTraverse(const char *baseName, /** - * virQEMUCapsQMPSchemaGetByPath: + * virQEMUQapiSchemaPathGet: * @query: string specifying the required data type (see below) * @schema: hash table containing the schema data * @entry: filled with the located schema object requested by @query @@ -150,9 +150,9 @@ virQEMUCapsQMPSchemaTraverse(const char *baseName, * error message. */ int -virQEMUCapsQMPSchemaGetByPath(const char *query, - virHashTablePtr schema, - virJSONValuePtr *entry) +virQEMUQapiSchemaPathGet(const char *query, + virHashTablePtr schema, + virJSONValuePtr *entry) { char **elems =3D NULL; @@ -167,7 +167,7 @@ virQEMUCapsQMPSchemaGetByPath(const char *query, return -1; } - *entry =3D virQEMUCapsQMPSchemaTraverse(*elems, elems + 1, schema); + *entry =3D virQEMUQapiSchemaTraverse(*elems, elems + 1, schema); virStringListFree(elems); return 0; @@ -175,12 +175,12 @@ virQEMUCapsQMPSchemaGetByPath(const char *query, bool -virQEMUCapsQMPSchemaQueryPath(const char *query, - virHashTablePtr schema) +virQEMUQapiSchemaPathExists(const char *query, + virHashTablePtr schema) { virJSONValuePtr entry; - if (virQEMUCapsQMPSchemaGetByPath(query, schema, &entry)) + if (virQEMUQapiSchemaPathGet(query, schema, &entry)) return false; return !!entry; diff --git a/src/qemu/qemu_qapi.h b/src/qemu/qemu_qapi.h index 413d0629b5..7b5546eefe 100644 --- a/src/qemu/qemu_qapi.h +++ b/src/qemu/qemu_qapi.h @@ -25,12 +25,12 @@ # include "virjson.h" int -virQEMUCapsQMPSchemaGetByPath(const char *query, - virHashTablePtr schema, - virJSONValuePtr *entry); +virQEMUQapiSchemaPathGet(const char *query, + virHashTablePtr schema, + virJSONValuePtr *entry); bool -virQEMUCapsQMPSchemaQueryPath(const char *query, - virHashTablePtr schema); +virQEMUQapiSchemaPathExists(const char *query, + virHashTablePtr schema); #endif /* __QEMU_QAPI_H__ */ --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list