diff options
author | Simon Glass <sjg@chromium.org> | 2012-12-26 09:53:33 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-03-04 14:19:56 -0500 |
commit | e6d5241534486effa116bf685f7707041492ec7b (patch) | |
tree | dc41035f0255983ce66fffb147ffc69a6aaeaae4 /fs/fat | |
parent | 117e050727d1f76bfc465f23eb3aa10f9f15cc1b (diff) | |
download | u-boot-imx-e6d5241534486effa116bf685f7707041492ec7b.zip u-boot-imx-e6d5241534486effa116bf685f7707041492ec7b.tar.gz u-boot-imx-e6d5241534486effa116bf685f7707041492ec7b.tar.bz2 |
fs: Move ls and read methods into ext4, fat
It doesn't make a lot of sense to have these methods in fs.c. They are
filesystem-specific, not generic code. Add each to the relevant
filesystem and remove the associated #ifdefs in fs.c.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'fs/fat')
-rw-r--r-- | fs/fat/fat.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 66d5473..b0fac5e 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -1260,3 +1260,20 @@ long file_fat_read(const char *filename, void *buffer, unsigned long maxsize) { return file_fat_read_at(filename, 0, buffer, maxsize); } + +int fat_read_file(const char *filename, void *buf, int offset, int len) +{ + int len_read; + + len_read = file_fat_read_at(filename, offset, buf, len); + if (len_read == -1) { + printf("** Unable to read file %s **\n", filename); + return -1; + } + + return len_read; +} + +void fat_close(void) +{ +} |