Re: [Qemu-devel] [PATCH 2/9] vmstate: complain about devices without vmstate

2011-07-20 Thread Gerd Hoffmann
On 07/20/11 14:40, Peter Maydell wrote: On 20 July 2011 11:09, Gerd Hoffmann wrote: --- a/hw/qdev.c +++ b/hw/qdev.c @@ -283,7 +283,12 @@ int qdev_init(DeviceState *dev) qdev_free(dev); return rc; } -if (dev->info->vmsd) { +if (dev->info->vmsd == NULL) { +/

Re: [Qemu-devel] [PATCH 2/9] vmstate: complain about devices without vmstate

2011-07-20 Thread Peter Maydell
On 20 July 2011 11:09, Gerd Hoffmann wrote: > --- a/hw/qdev.c > +++ b/hw/qdev.c > @@ -283,7 +283,12 @@ int qdev_init(DeviceState *dev) >         qdev_free(dev); >         return rc; >     } > -    if (dev->info->vmsd) { > +    if (dev->info->vmsd == NULL) { > +        /* TODO: fixup qemu source co

[Qemu-devel] [PATCH 2/9] vmstate: complain about devices without vmstate

2011-07-20 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/hw.h |2 ++ hw/qdev.c |7 ++- 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index df6ca65..d839af1 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -336,6 +336,8 @@ struct VMStateDescription { const VMStateSubsection *