Received: from eggs.gnu.org ([208.118.235.92]:33586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPI8w-0006OA-NB for qemu-devel@nongnu.org; Tue, 01 May 2012 14:49:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SPI8v-00050y-7V for qemu-devel@nongnu.org; Tue, 01 May 2012 14:49:46 -0400 Received: from [159.125.79.200] (port=22268 helo=localhost6.localdomain6) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SPI8v-00050I-3v for qemu-devel@nongnu.org; Tue, 01 May 2012 14:49:45 -0400 From: Anthony Liguori Date: Tue, 1 May 2012 13:18:01 -0500 Message-Id: <1335896294-9530-2-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1335896294-9530-1-git-send-email-aliguori@us.ibm.com> References: <1335896294-9530-1-git-send-email-aliguori@us.ibm.com> Subject: [Qemu-devel] [PATCH 01/14] 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 , Paolo Bonzini , Anthony Liguori , Andreas Faerber , Wanpeng Li 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 --- hw/qdev.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 0bcde20..6a8f6bd 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -576,9 +576,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.5.4