On Fri, 25 Apr 2008, Adrian Filipi wrote: > > It looks like fat.c is not handling the case where the > sectors/cluster is 1, and the rood directory spans multiple clusters. > > In my case I was getting garbage directoy info after the invalid fat > error. The attached patch stops the code from rolling past the end of > cluster. > > It looks like a loop to walk the allocation chain is neccessary. I > think get_contents() does all the right work, but it of course starts with a > directory entry, which we don't have yet for /. A little refactoring might > do the trick. > > Adrian > -- > Linux Software Engineer | EuroTech, Inc. | www.eurotech-inc.com
FYI, my patch may have prevented walking off the end of a cluster on FAT32, but it has its own problems with larger directories on FAT16. As such, I don't recommend using it. Adrian -- Linux Software Engineer | EuroTech, Inc. | www.eurotech-inc.com ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users