diff options
author | Suriyan Ramasami <suriyan.r@gmail.com> | 2014-11-17 14:39:37 -0800 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-11-23 06:49:04 -0500 |
commit | 96b1046d1c68352677aa888cc110951a68daf155 (patch) | |
tree | c5dc5804e2aa8bd4876a3057e5eb0bdeccaf9a43 /common/board_f.c | |
parent | 9f12cd0e062614e19734b2ab37842d387457c5e5 (diff) | |
download | u-boot-imx-96b1046d1c68352677aa888cc110951a68daf155.zip u-boot-imx-96b1046d1c68352677aa888cc110951a68daf155.tar.gz u-boot-imx-96b1046d1c68352677aa888cc110951a68daf155.tar.bz2 |
sandbox: Prepare API change for files greater than 2GB
Change the internal sandbox functions to use loff_t for file offsets.
Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/board_f.c')
-rw-r--r-- | common/board_f.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/board_f.c b/common/board_f.c index d4d25d7..c6e38f3 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -287,7 +287,7 @@ static int read_fdt_from_file(void) struct sandbox_state *state = state_get_current(); const char *fname = state->fdt_fname; void *blob; - ssize_t size; + loff_t size; int err; int fd; @@ -300,10 +300,10 @@ static int read_fdt_from_file(void) return -EINVAL; } - size = os_get_filesize(fname); - if (size < 0) { + err = os_get_filesize(fname, &size); + if (err < 0) { printf("Failed to file FDT file '%s'\n", fname); - return -ENOENT; + return err; } fd = os_open(fname, OS_O_RDONLY); if (fd < 0) { |