summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2012-12-26 09:53:35 +0000
committerTom Rini <trini@ti.com>2013-03-04 14:19:56 -0500
commit92ccc96bf3cd6c6a3a9a56e03d5ceb4874735d22 (patch)
tree7dda0f2132ce0b85cb574ca33ac85a9ac5727fd7 /include
parent62584db191013f13133be0f6702d0c935a7c85a6 (diff)
downloadtalos-obmc-uboot-92ccc96bf3cd6c6a3a9a56e03d5ceb4874735d22.tar.gz
talos-obmc-uboot-92ccc96bf3cd6c6a3a9a56e03d5ceb4874735d22.zip
sandbox: Add host filesystem
This allows reading of files from the host filesystem in sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'include')
-rw-r--r--include/fs.h1
-rw-r--r--include/sandboxfs.h30
2 files changed, 31 insertions, 0 deletions
diff --git a/include/fs.h b/include/fs.h
index 4f30a385a0..b6d69e5ced 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -21,6 +21,7 @@
#define FS_TYPE_ANY 0
#define FS_TYPE_FAT 1
#define FS_TYPE_EXT 2
+#define FS_TYPE_SANDBOX 3
/*
* Tell the fs layer which block device an partition to use for future
diff --git a/include/sandboxfs.h b/include/sandboxfs.h
new file mode 100644
index 0000000000..f5213ac107
--- /dev/null
+++ b/include/sandboxfs.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2012, Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __SANDBOX_FS__
+#define __SANDBOX_FS__
+
+int sandbox_fs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info);
+
+long sandbox_fs_read_at(const char *filename, unsigned long pos,
+ void *buffer, unsigned long maxsize);
+
+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);
+
+#endif
OpenPOWER on IntegriCloud