From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1IqqR5-0004Ac-V9 for mharc-grub-devel@gnu.org; Sat, 10 Nov 2007 08:31:44 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IqqR3-000494-JU for grub-devel@gnu.org; Sat, 10 Nov 2007 08:31:41 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IqqR2-000483-Rw for grub-devel@gnu.org; Sat, 10 Nov 2007 08:31:41 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IqqR2-00047u-Lt for grub-devel@gnu.org; Sat, 10 Nov 2007 08:31:40 -0500 Received: from mailout07.sul.t-online.de ([194.25.134.83] helo=mailout07.sul.t-online.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IqqR2-0007Wd-Ln for grub-devel@gnu.org; Sat, 10 Nov 2007 08:31:40 -0500 Received: from fwd28.aul.t-online.de by mailout07.sul.t-online.com with smtp id 1IqqR1-0000HK-04; Sat, 10 Nov 2007 14:31:39 +0100 Received: from [10.3.2.2] (rIYPzMZcohSd+8XIbqAeOD49KCNFosh3UXd2RDISat-4TJgw7YOBilTDx1bqizEQMX@[217.235.195.150]) by fwd28.aul.t-online.de with esmtp id 1IqqR0-0D2Ajo0; Sat, 10 Nov 2007 14:31:38 +0100 Message-ID: <4735B2B9.8070809@t-online.de> Date: Sat, 10 Nov 2007 14:31:37 +0100 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 MIME-Version: 1.0 To: The development of GRUB 2 References: <4720F3CA.7070804@t-online.de> <87zlxnlasz.fsf@xs4all.nl> In-Reply-To: <87zlxnlasz.fsf@xs4all.nl> Content-Type: multipart/mixed; boundary="------------050709020807010104050608" X-ID: rIYPzMZcohSd+8XIbqAeOD49KCNFosh3UXd2RDISat-4TJgw7YOBilTDx1bqizEQMX X-TOI-MSGID: c3a837f1-4604-4038-a373-b1d1326082ba X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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: Sat, 10 Nov 2007 13:31:41 -0000 This is a multi-part message in MIME format. --------------050709020807010104050608 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Marco Gerards wrote: >> .. >> >> 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. > > >> ... >> 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 "(". > > Done Christian 2007-11-10 Christian Franke * disk/host.c (grub_host_open): Remove attribute unused from name parameter. Add check for "host". This fixes the problem that grub-emu does not find partitions. --------------050709020807010104050608 Content-Type: text/x-patch; name="grub2-host_open-2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="grub2-host_open-2.patch" --- grub2.orig/disk/host.c 2007-08-02 19:24:05.000000000 +0200 +++ grub2/disk/host.c 2007-11-10 14:18:11.046875000 +0100 @@ -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"); + disk->total_sectors = 0; disk->id = (int) "host"; --------------050709020807010104050608--