diff options
author | Stephen Warren <swarren@nvidia.com> | 2014-02-03 13:21:07 -0700 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-02-19 09:47:34 -0500 |
commit | 0a30aa1e7e4e194ecc04c5970267bd6493db8eaf (patch) | |
tree | 32e0ce8519829a7e507efe0b7e842b469dc8c54d /fs/sandbox | |
parent | e5e897c01b1cd496187ca56a38ff5559d27f951c (diff) | |
download | u-boot-imx-0a30aa1e7e4e194ecc04c5970267bd6493db8eaf.zip u-boot-imx-0a30aa1e7e4e194ecc04c5970267bd6493db8eaf.tar.gz u-boot-imx-0a30aa1e7e4e194ecc04c5970267bd6493db8eaf.tar.bz2 |
sandbox: implement exists() function
This hooks into the generic "file exists" support added in an earlier
patch, and provides an implementation for the sandbox test environment.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'fs/sandbox')
-rw-r--r-- | fs/sandbox/sandboxfs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/sandbox/sandboxfs.c b/fs/sandbox/sandboxfs.c index dd028da..8507978 100644 --- a/fs/sandbox/sandboxfs.c +++ b/fs/sandbox/sandboxfs.c @@ -72,6 +72,14 @@ int sandbox_fs_ls(const char *dirname) return 0; } +int sandbox_fs_exists(const char *filename) +{ + ssize_t sz; + + sz = os_get_filesize(filename); + return sz >= 0; +} + void sandbox_fs_close(void) { } |