浏览代码

sandbox: only do sandboxfs for hostfs interface

Only do sandbox filesystem access when using the hostfs device
interface, rather then falling back to it in all cases. This prevents
confusion situations due to the fallback being taken rather then an
unsupported error being raised.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Sjoerd Simons 10 年之前
父节点
当前提交
85300a9a9d
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      fs/sandbox/sandboxfs.c

+ 5 - 1
fs/sandbox/sandboxfs.c

@@ -10,7 +10,11 @@
 
 int sandbox_fs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info)
 {
-	return 0;
+	/*
+	 * Only accept a NULL block_dev_desc_t for the sandbox, which is when
+	 * hostfs interface is used
+	 */
+	return rbdd != NULL;
 }
 
 int sandbox_fs_read_at(const char *filename, loff_t pos, void *buffer,