[LEDE-DEV] [PATCH 2/4] [RFC] fstools: block.c: Add support for checking vfat filesystems
Daniel Dickinson
lede at daniel.thecshore.com
Wed May 18 04:12:23 PDT 2016
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.
Regards,
Daniel
More information about the Lede-dev
mailing list