Patchwork [14/32] qdev/prop: convert qdev.c to helper macros.

login
register
mail settings
Submitter Gerd Hoffmann
Date Aug. 3, 2009, 3:35 p.m.
Message ID <1249313748-6459-15-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/30614/
State Superseded
Headers show

Comments

Gerd Hoffmann - Aug. 3, 2009, 3:35 p.m.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/qdev.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Anthony Liguori - Aug. 4, 2009, 1:27 p.m.
Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  hw/qdev.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/qdev.c b/hw/qdev.c
> index 9488dba..3de3bc9 100644
> --- a/hw/qdev.c
> +++ b/hw/qdev.c
> @@ -543,8 +543,8 @@ static void qdev_print_props(Monitor *mon, DeviceState *dev, Property *props,
>      if (!props)
>          return;
>      while (props->name) {
> -        if (props->info->print) {
> -            props->info->print(dev, props, buf, sizeof(buf));
> +        if (props->xinfo->print) {
> +            props->xinfo->print(dev, props, buf, sizeof(buf));
>              qdev_printf("%s-prop: %s = %s\n", prefix, props->name, buf);
>          }
>          props++;
>   
This doesn't match the description and breaks the build for me.

Regards,

Anthony Liguori
Gerd Hoffmann - Aug. 4, 2009, 1:43 p.m.
On 08/04/09 15:27, Anthony Liguori wrote:
> Gerd Hoffmann wrote:
>> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>> ---
>> hw/qdev.c | 4 ++--
>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/qdev.c b/hw/qdev.c
>> index 9488dba..3de3bc9 100644
>> --- a/hw/qdev.c
>> +++ b/hw/qdev.c
>> @@ -543,8 +543,8 @@ static void qdev_print_props(Monitor *mon,
>> DeviceState *dev, Property *props,
>> if (!props)
>> return;
>> while (props->name) {
>> - if (props->info->print) {
>> - props->info->print(dev, props, buf, sizeof(buf));
>> + if (props->xinfo->print) {
>> + props->xinfo->print(dev, props, buf, sizeof(buf));
>> qdev_printf("%s-prop: %s = %s\n", prefix, props->name, buf);
>> }
>> props++;
> This doesn't match the description and breaks the build for me.

Indeed.  Just drop that patch.

It is part of a little temporary patch to make gcc complain about any 
not-yet converted property.  It wasn't intended to sneak into public ...

cheers,
   Gerd

Patch

diff --git a/hw/qdev.c b/hw/qdev.c
index 9488dba..3de3bc9 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -543,8 +543,8 @@  static void qdev_print_props(Monitor *mon, DeviceState *dev, Property *props,
     if (!props)
         return;
     while (props->name) {
-        if (props->info->print) {
-            props->info->print(dev, props, buf, sizeof(buf));
+        if (props->xinfo->print) {
+            props->xinfo->print(dev, props, buf, sizeof(buf));
             qdev_printf("%s-prop: %s = %s\n", prefix, props->name, buf);
         }
         props++;