From patchwork Wed Apr 18 20:56:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony Liguori X-Patchwork-Id: 153587 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 398B0B6EEC for ; Thu, 19 Apr 2012 06:57:28 +1000 (EST) Received: from localhost ([::1]:48907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKbwM-000633-5i for incoming@patchwork.ozlabs.org; Wed, 18 Apr 2012 16:57:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKbwB-0005wg-7w for qemu-devel@nongnu.org; Wed, 18 Apr 2012 16:57:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SKbw9-0006uB-Lx for qemu-devel@nongnu.org; Wed, 18 Apr 2012 16:57:14 -0400 Received: from cpe-70-123-132-139.austin.res.rr.com ([70.123.132.139]:59605 helo=localhost6.localdomain6) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SKbw9-0006tw-FH for qemu-devel@nongnu.org; Wed, 18 Apr 2012 16:57:13 -0400 Received: from localhost6.localdomain6 (localhost.localdomain [127.0.0.1]) by localhost6.localdomain6 (8.14.4/8.14.4/Debian-2ubuntu2) with ESMTP id q3IKv61v019382; Wed, 18 Apr 2012 15:57:06 -0500 Received: (from anthony@localhost) by localhost6.localdomain6 (8.14.4/8.14.4/Submit) id q3IKv4DX019378; Wed, 18 Apr 2012 15:57:04 -0500 From: Anthony Liguori To: qemu-devel@nongnu.org Date: Wed, 18 Apr 2012 15:56:40 -0500 Message-Id: <1334782613-5421-2-git-send-email-aliguori@us.ibm.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1334782613-5421-1-git-send-email-aliguori@us.ibm.com> References: <1334782613-5421-1-git-send-email-aliguori@us.ibm.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 70.123.132.139 Cc: Wanpeng Li , Paolo Bonzini , Anthony Liguori , Andreas Faerber , Peter Maydell Subject: [Qemu-devel] [PATCH 01/14] qdev: fix adding of ptr properties X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 afbc975..83a1db6 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -575,9 +575,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);