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?