summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/fs.c2
-rw-r--r--fs/sandbox/sandboxfs.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/fs/fs.c b/fs/fs.c
index aaa6732..2e60f57 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -114,7 +114,7 @@ static struct fstype_info fstypes[] = {
.probe = sandbox_fs_set_blk_dev,
.close = sandbox_fs_close,
.ls = sandbox_fs_ls,
- .exists = fs_exists_unsupported,
+ .exists = sandbox_fs_exists,
.read = fs_read_sandbox,
.write = fs_write_sandbox,
},
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)
{
}