summaryrefslogtreecommitdiffstats
path: root/include/fat.h
diff options
context:
space:
mode:
authorSuriyan Ramasami <suriyan.r@gmail.com>2014-11-17 14:39:38 -0800
committerTom Rini <trini@ti.com>2014-11-23 06:49:04 -0500
commitd455d8789d5b35a39a0a179b3af4b423db13bfdd (patch)
tree751a2fa1db26cd7b6666bdf96cafc17db310e2b7 /include/fat.h
parent96b1046d1c68352677aa888cc110951a68daf155 (diff)
downloadtalos-obmc-uboot-d455d8789d5b35a39a0a179b3af4b423db13bfdd.tar.gz
talos-obmc-uboot-d455d8789d5b35a39a0a179b3af4b423db13bfdd.zip
fs: API changes enabling extra parameter to return size of type loff_t
The sandbox/ext4/fat/generic fs commands do not gracefully deal with files greater than 2GB. Negative values are returned in such cases. To handle this, the fs functions have been modified to take an additional parameter of type "* loff_t" which is then populated. The return value of the fs functions are used only for error conditions. Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> [trini: Update board/gdsys/p1022/controlcenterd-id.c, drivers/fpga/zynqpl.c for changes] Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'include/fat.h')
-rw-r--r--include/fat.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/fat.h b/include/fat.h
index 99c64291b0..3038bd7e4f 100644
--- a/include/fat.h
+++ b/include/fat.h
@@ -198,7 +198,7 @@ int file_cd(const char *path);
int file_fat_detectfs(void);
int file_fat_ls(const char *dir);
int fat_exists(const char *filename);
-int fat_size(const char *filename);
+int fat_size(const char *filename, loff_t *size);
int file_fat_read_at(const char *filename, loff_t pos, void *buffer,
loff_t maxsize, loff_t *actread);
int file_fat_read(const char *filename, void *buffer, int maxsize);
@@ -208,6 +208,7 @@ int fat_register_device(block_dev_desc_t *dev_desc, int part_no);
int file_fat_write(const char *filename, void *buf, loff_t offset, loff_t len,
loff_t *actwrite);
-int fat_read_file(const char *filename, void *buf, int offset, int len);
+int fat_read_file(const char *filename, void *buf, loff_t offset, loff_t len,
+ loff_t *actread);
void fat_close(void);
#endif /* _FAT_H_ */
OpenPOWER on IntegriCloud