Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JMfKS-0006ZC-PN for mharc-grub-devel@gnu.org; Wed, 06 Feb 2008 03:08:24 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JMfKQ-0006Yx-DS for grub-devel@gnu.org; Wed, 06 Feb 2008 03:08:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JMfKO-0006Yk-7E for grub-devel@gnu.org; Wed, 06 Feb 2008 03:08:21 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JMfKO-0006Yh-1E for grub-devel@gnu.org; Wed, 06 Feb 2008 03:08:20 -0500 Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JMfKN-0005gq-Lz for grub-devel@gnu.org; Wed, 06 Feb 2008 03:08:19 -0500 Received: from mailout11.sul.t-online.de ([194.25.134.85] helo=mailout11.sul.t-online.com) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JMfKM-0000ZL-P1 for grub-devel@gnu.org; Wed, 06 Feb 2008 03:08:18 -0500 Received: from fwd31.aul.t-online.de by mailout11.sul.t-online.com with smtp id 1JMfKK-0003eg-02; Wed, 06 Feb 2008 09:08:16 +0100 Received: from localhost (Z2wL3BZUZhAL2RN+PcArCZpZXi6yJ-LFM7qPZtyHc3exnSqbhRIllB3IhQa0SUwwFF@[172.20.101.250]) by fwd31.aul.t-online.de with esmtp id 1JMfJP-22Ult20; Wed, 6 Feb 2008 09:07:19 +0100 MIME-Version: 1.0 In-Reply-To: <20080206002439.GC2704@thorin> References: <47A8EB0D.6070103@t-online.de> <20080206002439.GC2704@thorin> Date: Wed, 06 Feb 2008 09:07:19 +0100 Errors-To: "Christian Franke" To: "The development of GRUB 2" X-UMS: email X-Mailer: TOI Kommunikationscenter V9-1-3 From: "Christian Franke" Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Message-ID: <1JMfJP-22Ult20@fwd31.aul.t-online.de> X-ID: Z2wL3BZUZhAL2RN+PcArCZpZXi6yJ-LFM7qPZtyHc3exnSqbhRIllB3IhQa0SUwwFF@t-dialin.net X-TOI-MSGID: ab8e7edb-31e2-4221-be3a-a9f846eaff5f X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 3) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) Subject: Re: [PATCH] Fix crash on open of nonexisting tar/cpio file, fix cpio trailer detection X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2008 08:08:22 -0000 Hi Robert, you wrote: > On Wed, Feb 06, 2008 at 12:02:37AM +0100, Christian Franke wrote: > > Two issues found in current CVS: > > > > 1. Booting a grub2-mkrescue floppy crashes if > > "(memdisk)/boot/grub/grub.cfg" does not exist. This is because > > grub_cpio_open does not set grub_errno if a file does not exist. > > I can't reproduce this with qemu: > > ./grub-mkrescue --pkglibdir=`pwd` --grub-mkimage=`pwd`/grub-mkimage > --image-type=floppy /tmp/grub-rescue-floppy.img qemu -fda > /tmp/grub-rescue-floppy.img -boot a > > is this supposed to be a spurious problem? > > This depends on the (random?) contents of the "file" variable. If a file does not exist, grub_cpio_open() returns GRUB_ERR_NONE but leaves the file variable as is. Accessing some non existent file ("cat (memdisk)/nosuchfile") should eventually result in a crash. Christian