[U-Boot] [U-Boot, v3] FAT: Make it possible to read from any file position

Benoît Thébaudeau benoit.thebaudeau at advansee.com
Fri Sep 28 13:32:28 CEST 2012


Hi Tom,

On Thursday, September 27, 2012 6:20:55 PM, Tom Rini wrote:
> On Tue, Sep 18, 2012 at 08:14:56AM -0000, Beno?t Th?baudeau wrote:
> 
> > When storage devices contain files larger than the embedded RAM, it
> > is useful to
> > be able to read these files by chunks, e.g. for a software update
> > to the
> > embedded NAND Flash from an external storage device (USB stick, SD
> > card, etc.).
> > 
> > Hence, this patch makes it possible by adding a new FAT API to read
> > files from a
> > given position. This patch also adds this feature to the fatload
> > command.
> > 
> > Signed-off-by: Beno?t Th?baudeau <benoit.thebaudeau at advansee.com>
> > Cc: Tom Rini <trini at ti.com>
> > Cc: Wolfgang Denk <wd at denx.de>
> 
> With a reformatting of the commit message and making the changes
> re-apply to master, I've applied this to u-boot/master, thanks!

Perfect.

I have a concern regarding the two patches that came in between:
[1] http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commitdiff;h=cfda5aeab89d73779e26f0d34cf10f64caa67431
[2] http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=commitdiff;h=10a37fd7a40826c43a63591855346adf1a1ac02d

Perhaps I'm wrong, and I admit I have not tested them, but looking at the code,
it seems to me that [2] breaks the "-" in the following feature of [1]:
"With the common function "dev:part" can come from the environment and a '-' can
be used in that case."
Hence, tests like "if (argc < 5)" in do_fat_fsload() get broken.

Also, the command usage message marks dev:part as optional, but it does not say
that this should actually be replaced by "-" if skipped.

Best regards,
Benoît


More information about the U-Boot mailing list