From d455d8789d5b35a39a0a179b3af4b423db13bfdd Mon Sep 17 00:00:00 2001 From: Suriyan Ramasami Date: Mon, 17 Nov 2014 14:39:38 -0800 Subject: 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 Acked-by: Simon Glass [trini: Update board/gdsys/p1022/controlcenterd-id.c, drivers/fpga/zynqpl.c for changes] Signed-off-by: Tom Rini --- include/sandboxfs.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include/sandboxfs.h') diff --git a/include/sandboxfs.h b/include/sandboxfs.h index 8e5da6bc6b..4c7745de91 100644 --- a/include/sandboxfs.h +++ b/include/sandboxfs.h @@ -28,8 +28,10 @@ int sandbox_fs_write_at(const char *filename, loff_t pos, void *buffer, void sandbox_fs_close(void); int sandbox_fs_ls(const char *dirname); int sandbox_fs_exists(const char *filename); -int sandbox_fs_size(const char *filename); -int fs_read_sandbox(const char *filename, void *buf, int offset, int len); -int fs_write_sandbox(const char *filename, void *buf, int offset, int len); +int sandbox_fs_size(const char *filename, loff_t *size); +int fs_read_sandbox(const char *filename, void *buf, loff_t offset, loff_t len, + loff_t *actread); +int fs_write_sandbox(const char *filename, void *buf, loff_t offset, + loff_t len, loff_t *actwrite); #endif -- cgit v1.2.3