From nobody Sun Feb 8 17:22:19 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344186; cv=none; d=zoho.com; s=zohoarc; b=gmnCjlVImY6KBY1FYEp8HqXDIeQR/5SrTlr0W97Ev77reHYrh1RZaEaNzARUhonCapLjp0/GtbwQRhWn9ORJ627CjKWlMUu2c0K36g90lcx9iAu+jmn7o4yh2+s99Mhl/DStHOCwI0P/7tI3fV357gLcvzQz+9DqAf+dbo+hOFE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344186; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=AE3bWcMrVvmaBT64l6f29RjBAy0tcOvZIQWE055ui4U=; b=W9CPgicrd3HZQKlrtqWM0qCp+miLPrq1jvKuHCFUYW/E0sgB3hZL+gZJacpkdW90bD0XYVEgJ++BClZ8CJ7qFnMpC5I1KPzTPESTq61RFYfS8yzauSwjyboeFHcoeammM+AoUS6z9HQ6AXnmhS4KiObcYZeizAG1Sq14lxtFTHs= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555344186887799.9171355279474; Mon, 15 Apr 2019 09:03:06 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E7243313D664; Mon, 15 Apr 2019 16:03:04 +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 B66BD5D71C; Mon, 15 Apr 2019 16:03:04 +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 6ECC93FB13; Mon, 15 Apr 2019 16:03:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2TYt003438 for ; Mon, 15 Apr 2019 12:02:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id E1FD31001E75; Mon, 15 Apr 2019 16:02:29 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 69EA51001947 for ; Mon, 15 Apr 2019 16:02:29 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:02:08 +0200 Message-Id: <13e00c2a3cdaee3ce8bb30e13f850aa6b400acec.1555344008.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 15/21] qemu: qapi: Prepare for extension of virQEMUQAPISchemaPathGet docs 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: , 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Mon, 15 Apr 2019 16:03:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Prepare section for boolean queries and make the typed query section more clear. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_qapi.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 05e4922c57..f17a162434 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -222,16 +222,24 @@ virQEMUQAPISchemaTraverse(const char *baseName, * @query parameter has the following syntax which is very closely tied to= the * qemu schema syntax entries separated by slashes with a few special char= acters: * - * "command_or_event/attribute/subattribute/+variant_discriminator/subattr= ibute" + * "command_or_event/attribute/subattribute/subattribute/..." * * command_or_event: name of the event or attribute to introspect * attribute: selects whether arguments or return type should be introspec= ted * ("arg-type" or "ret-type" for commands, "arg-type" for event= s) - * subattribute: specifies member name of object types - * *subattribute: same as above but must be optional (has a property named - * 'default' field in the schema) - * +variant_discriminator: In the case of unionized objects, select a - * specific case to introspect. + * + * 'subattribute' may be one or more of the following depending on the fir= st + * character. + * + * - Type queries - @entry is filled on success with the corresponding sch= ema entry: + * 'subattribute': selects a plain object member named 'subattribute' + * '*subattribute': same as above but the selected member must be option= al + * (has a property named 'default' in the schema) + * '+variant": In the case of unionized objects, select a specific varia= nt of + * the prevously selected member + * + * - Boolean queries - @entry remains NULL, return value indicates success: + * (none) * * If the name of any (sub)attribute starts with non-alphabetical symbols = it * needs to be prefixed by a single space. @@ -240,7 +248,8 @@ virQEMUQAPISchemaTraverse(const char *baseName, * types are currently not supported. * * The above types can be chained arbitrarily using slashes to construct a= ny - * path into the schema tree. + * path into the schema tree, booleans must be always the last component a= s they + * don't refer to a type. * * Returns 1 if @query was found in @schema filling @entry if non-NULL, 0 = if * @query was not found in @schema and -1 on other errors along with an ap= propriate --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list