From patchwork Tue Apr 3 11:15:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 150399 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 482F7B6FDB for ; Tue, 3 Apr 2012 21:17:02 +1000 (EST) Received: from localhost ([::1]:55311 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SF1jN-0000VA-1V for incoming@patchwork.ozlabs.org; Tue, 03 Apr 2012 07:16:57 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SF1j2-000073-SU for qemu-devel@nongnu.org; Tue, 03 Apr 2012 07:16:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SF1iw-0003BF-LE for qemu-devel@nongnu.org; Tue, 03 Apr 2012 07:16:36 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:61671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SF1iw-000393-Cv for qemu-devel@nongnu.org; Tue, 03 Apr 2012 07:16:30 -0400 Received: by mail-pb0-f45.google.com with SMTP id uo5so6178795pbc.4 for ; Tue, 03 Apr 2012 04:16:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=nWKdeDj5BCzCIoqK/j5HpDCShQatHb14cRUoCFrZ1j8=; b=UK/nGeG+v4FmGn66CeJ/iTCdE84+N/AFQaKkfx5NeEsdz2Rr/X76Hkj2q94p3xeK4H tOC6cHQurA0hKB74IRDJJ2puAgbkWVC3y5Ao7VfxaxbPIEJYj6SmkjvqbHsKKWtHRMOv Nr4TPH26ScfYzMFZVG4DYVgORr34nPVaw422Kaiq459YQx04BLYCU/I+0UEwUQoT64or 6iaiKZlBbzoUTQV8k8uyY009aXdFgstoJOcGdd1pAr0WYN44zj91KMAx3FYowWa+Z5N1 2rgowl+eP3eZ1JxmHRy67mn/skMBLR4zQ3GBBtf821JwqET41ZRUB4KNRb5M+vFr7GYS zndg== Received: by 10.68.201.73 with SMTP id jy9mr28315512pbc.35.1333451789476; Tue, 03 Apr 2012 04:16:29 -0700 (PDT) Received: from yakj.usersys.redhat.com (93-34-182-16.ip50.fastwebnet.it. [93.34.182.16]) by mx.google.com with ESMTPS id d4sm6055931pbr.32.2012.04.03.04.16.25 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 03 Apr 2012 04:16:28 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 3 Apr 2012 13:15:34 +0200 Message-Id: <1333451753-3550-7-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.9.3 In-Reply-To: <1333451753-3550-1-git-send-email-pbonzini@redhat.com> References: <1333451753-3550-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.45 Cc: Peter Maydell , aliguori@us.ibm.com, Jan Kiszka , afaerber@suse.de Subject: [Qemu-devel] [PATCH 06/25] qdev: fix -device foo,? 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 Since most property types do not have a parse property now, this was broken. Fix it by looking at the setter instead. Signed-off-by: Paolo Bonzini Reviewed-by: Anthony Liguori --- hw/qdev-monitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index 4783366..0acfc82 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -157,7 +157,7 @@ int qdev_device_help(QemuOpts *opts) * for removal. This conditional should be removed along with * it. */ - if (!prop->info->parse) { + if (!prop->info->set) { continue; /* no way to set it, don't show */ } error_printf("%s.%s=%s\n", driver, prop->name, @@ -165,7 +165,7 @@ int qdev_device_help(QemuOpts *opts) } if (info->bus_info) { for (prop = info->bus_info->props; prop && prop->name; prop++) { - if (!prop->info->parse) { + if (!prop->info->set) { continue; /* no way to set it, don't show */ } error_printf("%s.%s=%s\n", driver, prop->name,