aboutsummaryrefslogtreecommitdiff
path: root/include/fat.h
diff options
context:
space:
mode:
authorBenoît Thébaudeau <benoit.thebaudeau@advansee.com>2012-09-18 08:14:56 +0000
committerTom Rini <trini@ti.com>2012-09-26 11:11:32 -0700
commit1170e634dd2a6fdd541ae2153fd3fd73919da8fc (patch)
treedd1cdb0854199fad95296c84e54eeb319818b71b /include/fat.h
parent9aa90c1df09d6c0a43a5e000ba9d66d6f13b29cb (diff)
FAT: Make it possible to read from any file position
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@advansee.com> Cc: Wolfgang Denk <wd@denx.de> Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'include/fat.h')
-rw-r--r--include/fat.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/fat.h b/include/fat.h
index f1b4a0d97..cc85b0639 100644
--- a/include/fat.h
+++ b/include/fat.h
@@ -208,6 +208,8 @@ file_read_func file_fat_read;
int file_cd(const char *path);
int file_fat_detectfs(void);
int file_fat_ls(const char *dir);
+long file_fat_read_at(const char *filename, unsigned long pos, void *buffer,
+ unsigned long maxsize);
long file_fat_read(const char *filename, void *buffer, unsigned long maxsize);
const char *file_getfsname(int idx);
int fat_register_device(block_dev_desc_t *dev_desc, int part_no);