From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MfFOU-00041f-Vj for qemu-devel@nongnu.org; Sun, 23 Aug 2009 11:54:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MfFOQ-0003tk-0r for qemu-devel@nongnu.org; Sun, 23 Aug 2009 11:54:10 -0400 Received: from [199.232.76.173] (port=57739 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfFOP-0003tR-Rk for qemu-devel@nongnu.org; Sun, 23 Aug 2009 11:54:05 -0400 Received: from mail-bw0-f227.google.com ([209.85.218.227]:53769) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MfFOP-0004Cx-Cl for qemu-devel@nongnu.org; Sun, 23 Aug 2009 11:54:05 -0400 Received: by bwz27 with SMTP id 27so1309198bwz.34 for ; Sun, 23 Aug 2009 08:54:03 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4A8E2942.8020808@bravegnu.org> References: <4A8E2942.8020808@bravegnu.org> Date: Sun, 23 Aug 2009 17:54:03 +0200 Message-ID: Subject: Re: [Qemu-devel] [PATCH] Check block driver read error in pflash_cfi0x From: andrzej zaborowski Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vijay Kumar Cc: qemu-devel@nongnu.org 2009/8/21 Vijay Kumar : > If a flash file of size smaller than the flash size is specified in > the -pflash option, the block driver returns error. But the > pflash_cfi0x ignores the error. This results in a flash content of all > zeroes. And the simulation aborts while executing code. > > This patch adds the checks for errors from bdrv_read and escalates it > to the calling code. Maybe it should print a message indicating the expected size and exit? Cheers