From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjW4K-0002wY-QA for qemu-devel@nongnu.org; Wed, 20 Jul 2011 08:40:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QjW4J-0008UV-Ax for qemu-devel@nongnu.org; Wed, 20 Jul 2011 08:40:04 -0400 Received: from mail-pz0-f43.google.com ([209.85.210.43]:45754) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjW4I-0008U1-Sk for qemu-devel@nongnu.org; Wed, 20 Jul 2011 08:40:03 -0400 Received: by pzk1 with SMTP id 1so266543pzk.30 for ; Wed, 20 Jul 2011 05:40:00 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1311156579-9814-3-git-send-email-kraxel@redhat.com> References: <1311156579-9814-1-git-send-email-kraxel@redhat.com> <1311156579-9814-3-git-send-email-kraxel@redhat.com> Date: Wed, 20 Jul 2011 13:40:00 +0100 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/9] vmstate: complain about devices without vmstate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org 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) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 qdev_free(dev); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 return rc; > =C2=A0 =C2=A0 } > - =C2=A0 =C2=A0if (dev->info->vmsd) { > + =C2=A0 =C2=A0if (dev->info->vmsd =3D=3D NULL) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0/* TODO: fixup qemu source code, then make t= his an assert() */ > + =C2=A0 =C2=A0 =C2=A0 =C2=A0error_report("WARNING: device %s has no vmst= ate\n", dev->info->name); > + =C2=A0 =C2=A0} else if (dev->info->vmsd =3D=3D VMSD_NONE) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0/* device doesn't need vmstate */; > + =C2=A0 =C2=A0} 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 releas= e 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