Dear Ruud Commandeur,

In message 
<15ae5a936f5e3a42a9144e66875a0a89308...@server1-derijp.clb-Benelux.lokaal> you 
wrote:
> This patch fixes a number of mmc and fat-related bugs:
> 
> > Added a check for blkcnt > 0 in mmc_write_blocks (drivers/mmc.c) to preve=
> nt a hangup for further mmc commands.
> 
> > Solved a checksum issue in fs/fat/fat.c. The mkcksum has const char argum=
> ents with a size specifier, like "const char name[8]". In the function, it =
> is assumed that sizeof(name) will have the value 8, but this is not the cas=
> e (at least not for the Sourcery CodeBench compiler and probably not accord=
> ing to ANSI C). This causes "long filename checksum errors" for each fat fi=
> le listed or written.

Please explain.  Under which exact conditions would  sizeof(name) not
be 8, and where is such assumption supported in ANSI C?


I am tempted to NAK the FAT changes, as they make the code much harder
to read and to maintain.

Using this simple test program:

----- snip ----
#include <stdio.h>

int main(void)
{
        const char name[8];
        const char ext[3];

        printf("sizeof(name)=%d, expected 8\n", sizeof(name));
        printf("sizeof(ext) =%d, expected 3\n", sizeof(name));

        return 0;
}
----- snip ----

I get the expected values on all systems and with all compilers I
tested.   For which exact configuration do you get different results?

> > Made some changes to fs/fat/fat_write.c. Fixed testing fat_val for 0xffff=
> /0xfff8 and 0xfffffff/0xffffff8 by adding the corresponding fatsize in the =
> test (as read in earlier posts) and some changes in debug output.

Please restrict your line length in commit messages to some 70
characters or so.


> Signed-off-by: Ruud Commandeur <rcommand...@clb.nl>
> Cc: Tom Rini <tr...@ti.com>
> Cc: Beno=EEt Th=E9baudeau <benoit.thebaud...@advansee.com>
> Cc: Mats Karrman <mats.karr...@tritech.se>

Please split into three separate patches, one for MMX, and two for
FAT, one for each problem.  And make sure to add the MMC custodian
on Cc:

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
The existence of god implies a violation of causality.
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to