qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] qdev property listing broken


From: Paolo Bonzini
Subject: Re: [Qemu-devel] qdev property listing broken
Date: Mon, 02 Apr 2012 21:40:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]