Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1IqVP9-0001fN-RE for mharc-grub-devel@gnu.org; Fri, 09 Nov 2007 10:04:19 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IqVP8-0001df-Sc for grub-devel@gnu.org; Fri, 09 Nov 2007 10:04:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IqVP5-0001Xp-51 for grub-devel@gnu.org; Fri, 09 Nov 2007 10:04:18 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IqVP5-0001Xj-11 for grub-devel@gnu.org; Fri, 09 Nov 2007 10:04:15 -0500 Received: from smtp-vbr4.xs4all.nl ([194.109.24.24]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IqVP4-0000nL-Hj for grub-devel@gnu.org; Fri, 09 Nov 2007 10:04:14 -0500 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr4.xs4all.nl (8.13.8/8.13.8) with ESMTP id lA9F4DYD057480 for ; Fri, 9 Nov 2007 16:04:13 +0100 (CET) (envelope-from mgerards@xs4all.nl) From: Marco Gerards To: The development of GRUB 2 References: <4720F3CA.7070804@t-online.de> Mail-Copies-To: mgerards@xs4all.nl Date: Fri, 09 Nov 2007 16:04:44 +0100 In-Reply-To: <4720F3CA.7070804@t-online.de> (Christian Franke's message of "Thu, 25 Oct 2007 21:51:38 +0200") Message-ID: <87zlxnlasz.fsf@xs4all.nl> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 Subject: Re: [PATCH] Add host open devicename check 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: Fri, 09 Nov 2007 15:04:19 -0000 Christian Franke writes: > grub-emu ls command does not list any partitions. > > Device scan in grub_disk_open() stops early because grub_host_open() > returns success on all device names. > > Christian > > 2007-10-25 Christian Franke > > * disk/host.c (grub_host_open): Add check for "host". This fixes > the problem that grub-emu does not find partitions. Please mention the attribute change. > --- grub2.orig/disk/host.c 2007-08-02 19:24:05.000000000 +0200 > +++ grub2/disk/host.c 2007-10-13 15:11:18.000000000 +0200 > @@ -34,8 +34,11 @@ grub_host_iterate (int (*hook) (const ch > } > > static grub_err_t > -grub_host_open (const char *name __attribute((unused)), grub_disk_t disk) > +grub_host_open (const char *name, grub_disk_t disk) > { > + if (grub_strcmp(name, "host")) > + return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "not a host disk"); Please add a space after the function name and before the "(". -- Marco