From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPXnJ-0004oE-Br for qemu-devel@nongnu.org; Wed, 02 May 2012 07:32:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPXnC-0000Np-9q for qemu-devel@nongnu.org; Wed, 02 May 2012 07:32:28 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:35197) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPXnC-0000MM-3l for qemu-devel@nongnu.org; Wed, 02 May 2012 07:32:22 -0400 Received: by mail-gy0-f173.google.com with SMTP id r14so677963ghr.4 for ; Wed, 02 May 2012 04:32:21 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 2 May 2012 13:31:07 +0200 Message-Id: <1335958273-769-16-git-send-email-pbonzini@redhat.com> In-Reply-To: <1335958273-769-1-git-send-email-pbonzini@redhat.com> References: <1335958273-769-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 15/21] qdev: fix adding of ptr properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, liwp@linux.vnet.ibm.com, afaerber@suse.de From: Anthony Liguori ptr properties have neither a get/set or a print/parse which means that when they're added they aren't treated as static or legacy properties. Just assume properties like this are legacy properties and treat them as such. Signed-off-by: Anthony Liguori Signed-off-by: Paolo Bonzini --- hw/qdev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/qdev.c b/hw/qdev.c index f953c51..7f18590 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -550,9 +550,12 @@ void qdev_property_add_legacy(DeviceState *dev, Property *prop, { gchar *name, *type; - if (!prop->info->print && !prop->info->parse) { + /* Register pointer properties as legacy properties */ + if (!prop->info->print && !prop->info->parse && + (prop->info->set || prop->info->get)) { return; } + name = g_strdup_printf("legacy-%s", prop->name); type = g_strdup_printf("legacy<%s>", prop->info->legacy_name ?: prop->info->name); -- 1.7.9.3