qemu-devel
[Top][All Lists]
Advanced

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

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


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 2/9] vmstate: complain about devices without vmstate
Date: Wed, 20 Jul 2011 13:40:00 +0100

On 20 July 2011 11:09, Gerd Hoffmann <address@hidden> 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 code, then make this an assert() */
> +        error_report("WARNING: device %s has no vmstate\n", dev->info->name);
> +    } else if (dev->info->vmsd == VMSD_NONE) {
> +        /* device doesn't need vmstate */;
> +    } else {

I would prefer it if we didn't add this sort of targeted-at-qemu-developers
warning unless there was a reasonable period of time before the next release
where devices which provoke the warning message can be fixed. In particular,
should we postpone putting in the warning message until after 0.15 branches?

-- PMM



reply via email to

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