diff mbox

[v2,06/24] qdev: fix -device foo,?

Message ID 1334179842-6061-6-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini April 11, 2012, 9:30 p.m. UTC
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 <pbonzini@redhat.com>
---
 hw/qdev-monitor.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andreas Färber April 12, 2012, 4:29 p.m. UTC | #1
Am 11.04.2012 23:30, schrieb Paolo Bonzini:
> 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 <pbonzini@redhat.com>

Reviewed-by: Andreas Färber <afaerber@suse.de>

/-F
Jiri Denemark April 27, 2012, 9:37 a.m. UTC | #2
On Wed, Apr 11, 2012 at 23:30:24 +0200, Paolo Bonzini wrote:
> 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 <pbonzini@redhat.com>
> ---
>  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,

Oops, this patch (or an equivalent fix) doesn't seem to have been ever
applied, which makes libvirt quite unhappy with current qemu. Bootindex cannot
be used through libvirt, to name just one issue resulting from broken
-device foo,?

Jirka
Anthony Liguori April 27, 2012, 3:44 p.m. UTC | #3
On 04/27/2012 04:37 AM, Jiri Denemark wrote:
> On Wed, Apr 11, 2012 at 23:30:24 +0200, Paolo Bonzini wrote:
>> 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<pbonzini@redhat.com>
>> ---
>>   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,
>
> Oops, this patch (or an equivalent fix) doesn't seem to have been ever
> applied,

Yeah, there were a couple problems with the full series.  Paolo, can I just 
cherry pick this patch?

Regards,

Anthony Liguori

  which makes libvirt quite unhappy with current qemu. Bootindex cannot
> be used through libvirt, to name just one issue resulting from broken
> -device foo,?
>
> Jirka
>
Paolo Bonzini April 30, 2012, 7:54 p.m. UTC | #4
Il 27/04/2012 17:44, Anthony Liguori ha scritto:
> On 04/27/2012 04:37 AM, Jiri Denemark wrote:
>> On Wed, Apr 11, 2012 at 23:30:24 +0200, Paolo Bonzini wrote:
>>> 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<pbonzini@redhat.com>
>>> ---
>>>   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,
>>
>> Oops, this patch (or an equivalent fix) doesn't seem to have been ever
>> applied,
> 
> Yeah, there were a couple problems with the full series.  Paolo, can I
> just cherry pick this patch?

Yes, please.

Paolo
diff mbox

Patch

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,