[U-Boot] fatls shows duplicated entries with long and short names
Wolfgang Denk
wd at denx.de
Fri Nov 22 22:13:30 CET 2013
Dear Tom,
In message <20131122205046.GU420 at bill-the-cat> you wrote:
>
> So, the last report said that they had a tree missing
> 6ad77d88e57f6ab815ec7e85c5ac329054318c73, but yours can't be. Can you
> add some debug prints and see what's going on? Having
> u8 foo = bar();
> if (a && foo == baz) { ... }
> not work, but:
> if (a && bar() == baz) { ... }
> work is quite puzzling. Thanks!
The actual code is this:
if (dols && mkcksum(dentptr->name) == prevcksum) {
versus
__u8 csum = mkcksum(dentptr->name, dentptr->ext);
if (dols && csum == prevcksum) {
Note that csum is __u8, but prevcksum is __u16. Eventually there is a
type issue. It looks a bit fishy to me that prevcksum 16 bits, while
all operations are done on 8 bit data, and comparison is against 8 bit
as well.
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: wd at denx.de
"An open mind has but one disadvantage: it collects dirt."
- a saying at RPI
More information about the U-Boot
mailing list