Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LWFp6-0005SR-7f for mharc-grub-devel@gnu.org; Sun, 08 Feb 2009 15:00:12 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LWFp4-0005Rs-E9 for grub-devel@gnu.org; Sun, 08 Feb 2009 15:00:10 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LWFoz-0005QK-VE for grub-devel@gnu.org; Sun, 08 Feb 2009 15:00:10 -0500 Received: from [199.232.76.173] (port=50982 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWFoz-0005QF-Rg for grub-devel@gnu.org; Sun, 08 Feb 2009 15:00:05 -0500 Received: from moutng.kundenserver.de ([212.227.17.10]:59537) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LWFoz-0000oQ-88 for grub-devel@gnu.org; Sun, 08 Feb 2009 15:00:05 -0500 Received: from [85.180.55.22] (e180055022.adsl.alicedsl.de [85.180.55.22]) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis) id 0ML2xA-1LWFon1TcI-0003cf; Sun, 08 Feb 2009 20:59:53 +0100 From: Felix Zielcke To: The development of GRUB 2 In-Reply-To: <20090208195652.GB3579@thorin> References: <1233866360.3426.31.camel@fz.local> <20090207225222.GU6343@thorin> <1234083823.3429.3.camel@fz.local> <20090208180217.GB22127@thorin> <1234120687.3429.9.camel@fz.local> <20090208195652.GB3579@thorin> Content-Type: multipart/mixed; boundary="=-wr8aSpWY5NSVqVIUOuxS" Date: Sun, 08 Feb 2009 20:59:58 +0100 Message-Id: <1234123198.3429.11.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 X-Provags-ID: V01U2FsdGVkX19fKp4DTyGlbwXL8KGzRLbFyOX06GsE1yra/fw IKaq59lOw/x+AGfAaTPtFGe87ybDVzYygbAuhvpNfBgciq0SrM H+4OODbM57YAubFv9TYBIryh29X33bI X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] try to avoid false positives on FAT filesystem 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: Sun, 08 Feb 2009 20:00:10 -0000 --=-wr8aSpWY5NSVqVIUOuxS Content-Type: text/plain Content-Transfer-Encoding: 7bit Am Sonntag, den 08.02.2009, 20:56 +0100 schrieb Robert Millan: > I reviewed this thread and couldn't find it. Did you send it elsewhere? In my first message where you quoted the changelog entry. Well again attached. -- Felix Zielcke --=-wr8aSpWY5NSVqVIUOuxS Content-Disposition: attachment; filename=fat_avoid_fp.diff Content-Type: text/x-patch; name=fat_avoid_fp.diff; charset=utf-8 Content-Transfer-Encoding: 7bit 2009-02-05 Felix Zielcke fs/fat.c (grub_fat_mount): Try to avoid false positives by checking bpb.version_specific.fat12_or_fat16.fstype and bpb.version_specific.fat32.fstype. Index: fs/fat.c =================================================================== --- fs/fat.c (revision 1973) +++ fs/fat.c (working copy) @@ -187,6 +187,11 @@ grub_fat_mount (grub_disk_t disk) if (grub_disk_read (disk, 0, 0, sizeof (bpb), (char *) &bpb)) goto fail; + if (! grub_strncmp((const char *)bpb.version_specific.fat12_or_fat16.fstype,"FAT12",5) + || ! grub_strncmp((const char *)bpb.version_specific.fat12_or_fat16.fstype,"FAT16",5) + || ! grub_strncmp((const char *)bpb.version_specific.fat32.fstype,"FAT32",5)) + goto fail; + /* Get the sizes of logical sectors and clusters. */ data->logical_sector_bits = fat_log2 (grub_le_to_cpu16 (bpb.bytes_per_sector)); --=-wr8aSpWY5NSVqVIUOuxS--