From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEnA7-0005qg-65 for qemu-devel@nongnu.org; Mon, 02 Apr 2012 15:43:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEnA5-0006VL-Ca for qemu-devel@nongnu.org; Mon, 02 Apr 2012 15:43:34 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:34190) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEnA5-0006VG-7w for qemu-devel@nongnu.org; Mon, 02 Apr 2012 15:43:33 -0400 Received: by ggnp2 with SMTP id p2so2006799ggn.4 for ; Mon, 02 Apr 2012 12:43:31 -0700 (PDT) Message-ID: <4F7A0160.2000109@codemonkey.ws> Date: Mon, 02 Apr 2012 14:43:28 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <4F79FF0E.9090701@web.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] qdev property listing broken List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On 04/02/2012 02:40 PM, Paolo Bonzini wrote: > 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, Oh, I misunderstood but I understand now. This is a regression. Thanks Paolo. Regards, Anthony Liguori > @@ -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 > >