[U-Boot-Users] FW: USB SUPPORT & get_vfatname
michael
trimarchi at gandalf.sssup.it
Sun Apr 27 13:26:32 CEST 2008
Hi,
I prepare a new versione of fat support to test in user space, with some
modification of the
function. So before to post a patch in u-boot mailing list, we can
adjust the library.
I send an archive that contains a first step in this direction
Regards Michael
Ken.Fuchs at bench.com wrote:
> 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 directory info after
>> the invalid fat error. The attached patch stops the code
>> from rolling past the end of cluster.
>>
>
> I was also getting these garbage directory entries which appeared
> to be file nodes being interpreted as directory nodes.
>
> I can confirm that Adrian's patch fixes this particular problem
> for FAT32. Now, on FAT32, whatever files are displayed by fatls
> are also readable by fatload. As Adrian mentions below, the files
> not displayed by fatls are completely inaccessible to the current
> fat.c with or without Adrian's patch.
>
> FAT16 also suffered from this "garbage" problem when there were
> 512 files, but the patch also fixes this. (If there is a volume
> name, it should use one of the root directory entries, leaving
> only 511 directory entries for files; otherwise, the lack/presence
> of a volume name probably has no effect on FAT16.)
>
>
>> It looks like a loop to walk the allocation chain is
>> necessary. 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.
>>
>
> Of course this only applies to FAT32. Adrian's patch appears to
> have fixed the only issue with FAT16 that I'm aware of.
>
> Time permitting, I will try to fix this remaining problem myself.
> Adrian, thanks for your insight into the problem and a potential
> solution.
>
> Sincerely,
>
> Ken Fuchs
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: user-uboot-fat.gz
Type: application/x-gzip
Size: 14528 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20080427/52f91187/attachment.bin
More information about the U-Boot
mailing list