From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=48640 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKb12-0008DM-Ey for qemu-devel@nongnu.org; Fri, 04 Jun 2010 13:49:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OKayi-0004Ig-RS for qemu-devel@nongnu.org; Fri, 04 Jun 2010 13:46:45 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:48915) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OKayi-0004Gw-Lx for qemu-devel@nongnu.org; Fri, 04 Jun 2010 13:46:44 -0400 Received: by wyb36 with SMTP id 36so1113826wyb.4 for ; Fri, 04 Jun 2010 10:46:43 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4C0937D4.3010607@redhat.com> References: <1275594761-15258-1-git-send-email-miguel.filho@gmail.com> <4C0937D4.3010607@redhat.com> Date: Fri, 4 Jun 2010 14:46:43 -0300 Message-ID: From: Miguel Di Ciurcio Filho Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH v3] savevm: Really verify if a drive supports snapshots List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org On Fri, Jun 4, 2010 at 2:28 PM, Kevin Wolf wrote: >> @@ -1674,12 +1659,26 @@ void do_savevm(Monitor *mon, const QDict *qdict) >> =A0#endif >> =A0 =A0 =A0const char *name =3D qdict_get_try_str(qdict, "name"); >> >> + =A0 =A0/* Verify if there is a device that doesn't support snapshots a= nd is writable */ >> + =A0 =A0QTAILQ_FOREACH(dinfo, &drives, next) { >> + =A0 =A0 =A0 =A0bs =3D dinfo->bdrv; >> + >> + =A0 =A0 =A0 =A0if (bdrv_is_removable(bs) || bdrv_is_read_only(bs)) { >> + =A0 =A0 =A0 =A0 =A0 =A0continue; >> + =A0 =A0 =A0 =A0} >> + >> + =A0 =A0 =A0 =A0if (!bdrv_can_snapshot(bs)) { >> + =A0 =A0 =A0 =A0 =A0 =A0monitor_printf(mon, "Device '%s' is writable bu= t does not support snapshots.\n", >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 bdrv_get_d= evice_name(bs)); >> + =A0 =A0 =A0 =A0 =A0 =A0goto the_end; > > cc1: warnings being treated as errors > savevm.c: In Funktion =BBdo_savevm=AB: > savevm.c:1654: Fehler: =BBsaved_vm_running=AB may be used uninitialized i= n > this function > > return instead of goto the_end is probably the right thing to do here. > Strange. This warning did not happen with me. Miguel