summaryrefslogtreecommitdiff
path: root/include/sandboxfs.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-04-20 08:42:51 +0000
committerTom Rini <trini@ti.com>2013-05-01 11:17:21 -0400
commit7eb2c8d573ad932bf67095f11c6b3beba41064f2 (patch)
treee4f2e0f533ea14d758c09de28c143bbe60c70dbc /include/sandboxfs.h
parenta8f6ab5229fb4cd8299df84c8698e128b5125a8e (diff)
sandbox: fs: Add support for saving files to host filesystem
This allows write of files from the host filesystem in sandbox. There is currently no concept of overwriting the file and removing its existing contents - all writing is done on top of what is there. This means that writing 10 bytes to the start of a 1KB file will only update those 10 bytes, not truncate the file to 10 byte slong. If the file does not exist it is created. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/sandboxfs.h')
-rw-r--r--include/sandboxfs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sandboxfs.h b/include/sandboxfs.h
index f5213ac1075..8ea8cb7e2e6 100644
--- a/include/sandboxfs.h
+++ b/include/sandboxfs.h
@@ -26,5 +26,6 @@ long sandbox_fs_read_at(const char *filename, unsigned long pos,
void sandbox_fs_close(void);
int sandbox_fs_ls(const char *dirname);
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);
#endif