From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4UfW-0008EA-Iv for qemu-devel@nongnu.org; Fri, 16 Sep 2011 05:25:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4UfU-0001rH-JS for qemu-devel@nongnu.org; Fri, 16 Sep 2011 05:25:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25086) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4UfU-0001qf-CK for qemu-devel@nongnu.org; Fri, 16 Sep 2011 05:25:08 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8G9P6YO010375 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 16 Sep 2011 05:25:07 -0400 From: Gerd Hoffmann Date: Fri, 16 Sep 2011 11:25:05 +0200 Message-Id: <1316165105-18315-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH] qdev: print bus properties too List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: ddutile@redhat.com, armbru@redhat.com, Gerd Hoffmann Make qdev_device_help print both device and bus properties. Helps libvirt to figure whenever bus properties such as PCI.multifunction are supported present or not. Signed-off-by: Gerd Hoffmann --- hw/qdev.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index c463c52..a223d41 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -207,6 +207,12 @@ int qdev_device_help(QemuOpts *opts) } error_printf("%s.%s=%s\n", info->name, prop->name, prop->info->name); } + for (prop = info->bus_info->props; prop && prop->name; prop++) { + if (!prop->info->parse) { + continue; /* no way to set it, don't show */ + } + error_printf("%s.%s=%s\n", info->name, prop->name, prop->info->name); + } return 1; } -- 1.7.1