[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] r1986 broke FAT detection
From: |
Felix Zielcke |
Subject: |
Re: [PATCH] r1986 broke FAT detection |
Date: |
Tue, 10 Feb 2009 10:50:44 +0100 |
Am Dienstag, den 10.02.2009, 01:19 +0100 schrieb Javier Martín:
> 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:
>
> if (! grub_strncmp(something, "FAT12", 5))
> goto fail;
>
> 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.
--
Felix Zielcke