From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LWpGd-0005xh-7i for mharc-grub-devel@gnu.org; Tue, 10 Feb 2009 04:50:59 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LWpGb-0005wi-Ou for grub-devel@gnu.org; Tue, 10 Feb 2009 04:50:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LWpGZ-0005ud-Mx for grub-devel@gnu.org; Tue, 10 Feb 2009 04:50:57 -0500 Received: from [199.232.76.173] (port=59377 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWpGZ-0005uP-HS for grub-devel@gnu.org; Tue, 10 Feb 2009 04:50:55 -0500 Received: from moutng.kundenserver.de ([212.227.126.177]:53365) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LWpGY-0004vO-T4 for grub-devel@gnu.org; Tue, 10 Feb 2009 04:50:55 -0500 Received: from [85.180.26.104] (e180026104.adsl.alicedsl.de [85.180.26.104]) by mrelayeu.kundenserver.de (node=mrelayeu2) with ESMTP (Nemesis) id 0MKwtQ-1LWpGI1DBs-0004q2; Tue, 10 Feb 2009 10:50:42 +0100 From: Felix Zielcke To: The development of GRUB 2 In-Reply-To: <1234225160.10940.25.camel@localhost> References: <1234225160.10940.25.camel@localhost> Content-Type: text/plain; charset=utf-8 Date: Tue, 10 Feb 2009 10:50:44 +0100 Message-Id: <1234259444.3416.8.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V01U2FsdGVkX19HRQ9apDYyuaLZtX2tQvZSfk9nknYjlQO+jfE 44OzH7xlpMPkKajGMlR9/YGI4YZ8FuGW7KH13LlObScfj7E1DM JNqA9nhH+Zp7DqPYVYaQO6TabK8cnog X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] r1986 broke FAT 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: Tue, 10 Feb 2009 09:50:58 -0000 Am Dienstag, den 10.02.2009, 01:19 +0100 schrieb Javier Mart=C3=ADn: > At r1985, "sudo ./grub-probe -t fs -d /dev/fd0" outputs "fat" with a > freshly-formatted VFAT floppy in the drive. At r1986, it spits "error: > unknown filesystem". The cause is this error, repeated three times: >=20 > if (! grub_strncmp(something, "FAT12", 5)) > goto fail; >=20 > Strncmp does not return a boolean result (i.e. matches or doesn't), but > an _integer_ that is supposed to establish a comparison order between > strings. Thus, a return value of 0 is actually a match. See why I insist > on treating semantic-ints different than semantic-bools even though the > language does not? The correction is obvious (a patch is attached): Thanks for your patch. Commited. --=20 Felix Zielcke