From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LOoMq-0004gr-7w for qemu-devel@nongnu.org; Mon, 19 Jan 2009 02:16:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LOoMp-0004g5-CG for qemu-devel@nongnu.org; Mon, 19 Jan 2009 02:16:15 -0500 Received: from [199.232.76.173] (port=58091 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LOoMp-0004fs-1n for qemu-devel@nongnu.org; Mon, 19 Jan 2009 02:16:15 -0500 Received: from fg-out-1718.google.com ([72.14.220.156]:17726) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LOoMo-0005pe-Kt for qemu-devel@nongnu.org; Mon, 19 Jan 2009 02:16:14 -0500 Received: by fg-out-1718.google.com with SMTP id 19so1232413fgg.8 for ; Sun, 18 Jan 2009 23:16:12 -0800 (PST) Message-ID: <761ea48b0901182316q107d3a7p522a35a8425792b5@mail.gmail.com> Date: Mon, 19 Jan 2009 08:16:12 +0100 From: "Laurent Desnogues" Subject: Re: [Qemu-devel] [PATCH] Fix crash at startup In-Reply-To: <1232348333.23907.5.camel@cocoduo.atr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_14420_2031750.1232349372309" References: <1232348333.23907.5.camel@cocoduo.atr> 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 ------=_Part_14420_2031750.1232349372309 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Mon, Jan 19, 2009 at 7:58 AM, Lionel Landwerlin wrote: > Fix crash at startup > > Signed-off-by: Lionel Landwerlin > --- > exec.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/exec.c b/exec.c > index faa6333..7c9d7dc 100644 > --- a/exec.c > +++ b/exec.c > @@ -2066,2 +2066,2 @@ void page_dump(FILE *f) > int i, j, prot, prot1; > PageDesc *p; > > + if (!f) > + return; > + I would prefer a slightly different approach like the attached patch, but that's just personal taste :-) Laurent Signed-off-by: Laurent Desnogues ------=_Part_14420_2031750.1232349372309 Content-Type: text/x-patch; name=log.patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_fq4sykrs0 Content-Disposition: attachment; filename=log.patch SW5kZXg6IHFlbXUtbG9nLmgKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gcWVtdS1sb2cuaAkocmV2aXNpb24gNjM2 NykKKysrIHFlbXUtbG9nLmgJKHdvcmtpbmcgY29weSkKQEAgLTYzLDEwICs2MywxMiBAQAogICAg ICAgICBkaXNhcyhsb2dmaWxlLCAoc3RhcnQpLCAobGVuKSkKIAogLyogcGFnZV9kdW1wKCkgb3V0 cHV0IHRvIHRoZSBsb2cgZmlsZTogKi8KLSNkZWZpbmUgbG9nX3BhZ2VfZHVtcCgpIHBhZ2VfZHVt cChsb2dmaWxlKQorI2RlZmluZSBsb2dfcGFnZV9kdW1wKCkgZG8geyAgICAgXAorICAgICAgICBp ZiAobG9nZmlsZSkgICAgICAgICAgICAgXAorICAgICAgICAgICAgcGFnZV9kdW1wKGxvZ2ZpbGUp OyAgXAorICAgIH0gd2hpbGUgKDApCiAKIAotCiAvKiBNYWludGVuYW5jZTogKi8KIAogLyogZmZs dXNoKCkgdGhlIGxvZyBmaWxlICovCg== ------=_Part_14420_2031750.1232349372309--