[LEDE-DEV] [PATCH 2/4] [RFC] fstools: block.c: Add support for checking vfat filesystems
Arjen de Korte
arjen+lede at de-korte.org
Wed May 18 04:17:57 PDT 2016
Citeren Daniel Dickinson <lede at daniel.thecshore.com>:
> On 16-05-18 07:05 AM, Conor O'Gorman wrote:
>> On 18/05/16 11:12, lede at daniel.thecshore.com wrote:
>>> + if (!strncmp(pr->id->name, "vfat", 4)) {
>>> + ckfs = e2fsck;
>>> + } else if (!strncmp(pr->id->name, "ext", 3)) {
>>> + ckfs = dosfsck;
>> Is this the wrong way round?
>
> Do you mean you mean you think ext should be tested first?
>
>
> ckfs = x is obvious correction because we're setting the ckfs to the
> command to do the filesystem check.
>
> Otherwise I'm not sure what you're asking...
>
> Perhaps your problem is with the C idiom (!strncmp is correct because
> strncmp returns 0 on a match (which == false for the if)).
>
> I have no other guesses as to what you're getting at.
I guess "vfat" should be checked with dosfsck and "ext" with e2fsck.
More information about the Lede-dev
mailing list