Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LWWoK-0001xF-MO for mharc-grub-devel@gnu.org; Mon, 09 Feb 2009 09:08:32 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LWWoI-0001x4-5O for grub-devel@gnu.org; Mon, 09 Feb 2009 09:08:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LWWoG-0001vu-67 for grub-devel@gnu.org; Mon, 09 Feb 2009 09:08:29 -0500 Received: from [199.232.76.173] (port=51272 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWWoG-0001vr-1W for grub-devel@gnu.org; Mon, 09 Feb 2009 09:08:28 -0500 Received: from aybabtu.com ([69.60.117.155]:40015) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LWWoF-0000I6-Jb for grub-devel@gnu.org; Mon, 09 Feb 2009 09:08:27 -0500 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1LWWit-0001TQ-Dz for grub-devel@gnu.org; Mon, 09 Feb 2009 15:02:55 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1LWWnl-0001Bd-8y for grub-devel@gnu.org; Mon, 09 Feb 2009 15:07:57 +0100 Date: Mon, 9 Feb 2009 15:07:57 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20090209140757.GB4394@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> <1234123198.3429.11.camel@fz.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1234123198.3429.11.camel@fz.local> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) 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: Mon, 09 Feb 2009 14:08:30 -0000 On Sun, Feb 08, 2009 at 08:59:58PM +0100, Felix Zielcke wrote: > 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. Sorry, I must have lost it. > 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)); Looks good to me. But please add spaces between ')' and 'b', and after ','. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."