From nobody Sun Feb 8 22:05:32 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=1558079111; cv=none; d=zoho.com; s=zohoarc; b=Ad+MdUUrCMWTOY1RjhcEb4313eDZ1gRBXhKa3gkDo5Bjjh2c1FQbCozJFTgikJgiDB8zeqdtfxQz5L6QgNSal1cOqtO4e6GAQjHxlL+pkNPr1mtfHj2pBU4z5MKtlS8QNRtulPT+mVy0djHY+qfZ8g0V+YMLinEILoE5MwL/m+c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558079111; h=Content-Type:Content-Transfer-Encoding:Cc: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=7gZY9etJ7suU8J1YKCECnq6n4+BgIpRfAhjVJiXzmnM=; b=Llem5omSPb+FpeljlQAcPLl8kZ18ES1FoTtdwbruArUqMXOCBFXceCRgnfWub5yFtJ99xCn11+XaMKxYJDTv3iJhdoS8PDgB8UUWKBtc8NiY2ZSP6SiJumD806Vd78LPUQPqBXdW1VR8obNrDJUTFvNmiHiJ3UdGr1XGv4JgZZk= 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 1558079111378954.4281490147729; Fri, 17 May 2019 00:45:11 -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 28AE430821AE; Fri, 17 May 2019 07:45:03 +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 8B6B45D6A9; Fri, 17 May 2019 07:44:59 +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 16B0C206D4; Fri, 17 May 2019 07:44:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4H7iqZ5025506 for ; Fri, 17 May 2019 03:44:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1FB1317143; Fri, 17 May 2019 07:44:52 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id CD3DD17151; Fri, 17 May 2019 07:44:50 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Fri, 17 May 2019 09:45:15 +0200 Message-Id: <1558079119-320634-3-git-send-email-imammedo@redhat.com> In-Reply-To: <1558079119-320634-1-git-send-email-imammedo@redhat.com> References: <1558079119-320634-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: libvir-list@redhat.com, pbonzini@redhat.com, ehabkost@redhat.com Subject: [libvirt] [PATCH v3 2/6] qmp: make "qom-list-properties" show initial property values 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Fri, 17 May 2019 07:45:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Add in the command output object's property values right after creation (i.e. state of the object returned by object_new() or equivalent). Follow up patch will add machine property 'numa-mem-supported', which would allow mgmt to introspect which machine types (versions) still support legacy "-numa mem=3DFOO" CLI option and which don't and require alternative '-numa memdev' option being used. Signed-off-by: Igor Mammedov --- qapi/misc.json | 5 ++++- qmp.c | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/qapi/misc.json b/qapi/misc.json index 8b3ca4f..e333285 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -1365,10 +1365,13 @@ # # @description: if specified, the description of the property. # +# @default: initial property value. +# # Since: 1.2 ## { 'struct': 'ObjectPropertyInfo', - 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } } + 'data': { 'name': 'str', 'type': 'str', '*description': 'str', + '*default': 'any' } } =20 ## # @qom-list: diff --git a/qmp.c b/qmp.c index b92d62c..8415541 100644 --- a/qmp.c +++ b/qmp.c @@ -593,6 +593,11 @@ ObjectPropertyInfoList *qmp_qom_list_properties(const = char *typename, info->type =3D g_strdup(prop->type); info->has_description =3D !!prop->description; info->description =3D g_strdup(prop->description); + if (obj) { + info->q_default =3D + object_property_get_qobject(obj, info->name, NULL); + info->has_q_default =3D !!info->q_default; + } =20 entry =3D g_malloc0(sizeof(*entry)); entry->value =3D info; --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list