From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEn75-0004Ci-0t for qemu-devel@nongnu.org; Mon, 02 Apr 2012 15:40:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEn73-00060C-83 for qemu-devel@nongnu.org; Mon, 02 Apr 2012 15:40:26 -0400 Received: from plane.gmane.org ([80.91.229.3]:56139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEn73-0005zy-0t for qemu-devel@nongnu.org; Mon, 02 Apr 2012 15:40:25 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SEn70-0007gH-DY for qemu-devel@nongnu.org; Mon, 02 Apr 2012 21:40:22 +0200 Received: from 93-34-182-16.ip50.fastwebnet.it ([93.34.182.16]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Apr 2012 21:40:22 +0200 Received: from pbonzini by 93-34-182-16.ip50.fastwebnet.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Apr 2012 21:40:22 +0200 From: Paolo Bonzini Date: Mon, 02 Apr 2012 21:40:12 +0200 Message-ID: References: <4F79FF0E.9090701@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit In-Reply-To: <4F79FF0E.9090701@web.de> Subject: Re: [Qemu-devel] qdev property listing broken List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Il 02/04/2012 21:33, Jan Kiszka ha scritto: > Hi Anthony, > > I noticed that only properties with legacy names are printed via info > qtree. After digging through the qdev and qom property maze, it turned > out the property registration in qdev_property_add_legacy and > qdev_property_add_static is not consistent with the access in > qdev_print_props. The latter assumes all properties are strings, the > former generate the full set of types - and add_legacy obviously an > inconsistent one, dependent on the existence of print/parse handlers. I > fail to see the right direction, ie. where to fix this. Can you provide > a hint? Actually the patch is trivial. Pardon the likely whitespace damage, I'll send it properly tomorrow morning (it was ready but today I didn't have the time to test the whole series properly). diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index a310cc7..923519c 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->get) { 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->get) { continue; /* no way to set it, don't show */ } error_printf("%s.%s=%s\n", driver, prop->name, Paolo