From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HxqTs-0002I6-Ts for qemu-devel@nongnu.org; Mon, 11 Jun 2007 16:27:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HxqTs-0002Hl-9o for qemu-devel@nongnu.org; Mon, 11 Jun 2007 16:27:16 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HxqTs-0002Hi-21 for qemu-devel@nongnu.org; Mon, 11 Jun 2007 16:27:16 -0400 Received: from moutng.kundenserver.de ([212.227.126.177]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HxqTr-0004Ra-KQ for qemu-devel@nongnu.org; Mon, 11 Jun 2007 16:27:15 -0400 Received: from localhost ([127.0.0.1]) by localhost.localdomain with esmtp (Exim 4.63) (envelope-from ) id 1HxqTp-0001S3-V4 for qemu-devel@nongnu.org; Mon, 11 Jun 2007 22:27:14 +0200 Message-ID: <466DB021.1070409@weilnetz.de> Date: Mon, 11 Jun 2007 22:27:13 +0200 From: Stefan Weil MIME-Version: 1.0 Subject: [Qemu-devel] [BUG] [PATCH] qemu vl.c vl.h References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------070808040800070307000208" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------070808040800070307000208 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Removing dumb_display_init introduced a bug for -nographic mode. QEMU crashs when dpy_update (or dpy_resize) is called, because the corresponding function pointers are zero. The patch adds dumb_display_init again (and declares it static because it is only used locally in vl.c). Stefan Thiemo Seufer schrieb: > CVSROOT: /sources/qemu > Module name: qemu > Changes by: Thiemo Seufer 07/06/08 01:57:57 > > Modified files: > . : vl.c vl.h > > Log message: > Don't refresh a graphical screen when it isn't displayed, by Herve > Poussineau. > > CVSWeb URLs: > http://cvs.savannah.gnu.org/viewcvs/qemu/vl.c?cvsroot=qemu&r1=1.304&r2=1.305 > http://cvs.savannah.gnu.org/viewcvs/qemu/vl.h?cvsroot=qemu&r1=1.249&r2=1.250 --------------070808040800070307000208 Content-Type: text/x-diff; name="vl.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="vl.patch" Index: vl.c =================================================================== RCS file: /sources/qemu/qemu/vl.c,v retrieving revision 1.306 diff -u -b -B -r1.306 vl.c --- vl.c 10 Jun 2007 19:21:04 -0000 1.306 +++ vl.c 11 Jun 2007 20:20:41 -0000 @@ -4481,6 +4481,16 @@ "Empty"); } +static void dumb_display_init(DisplayState *ds) +{ + ds->data = NULL; + ds->linesize = 0; + ds->depth = 0; + ds->dpy_update = dumb_update; + ds->dpy_resize = dumb_resize; + ds->dpy_refresh = dumb_refresh; +} + /***********************************************************/ /* I/O handling */ @@ -4804,7 +4814,8 @@ int64_t qemu_fseek(QEMUFile *f, int64_t pos, int whence) { if (whence == SEEK_SET) { - /* nothing to do */ + /* nearly nothing to do */ + dumb_display_init(ds); } else if (whence == SEEK_CUR) { pos += qemu_ftell(f); } else { --------------070808040800070307000208--