Commit 85300a9a9dfb364ab1a5f94e6d3f9e558a193be1

Authored by Sjoerd Simons
Committed by Simon Glass
1 parent b8d7652c81

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>

Showing 1 changed file with 5 additions and 1 deletions Side-by-side Diff

fs/sandbox/sandboxfs.c
... ... @@ -10,7 +10,11 @@
10 10  
11 11 int sandbox_fs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info)
12 12 {
13   - return 0;
  13 + /*
  14 + * Only accept a NULL block_dev_desc_t for the sandbox, which is when
  15 + * hostfs interface is used
  16 + */
  17 + return rbdd != NULL;
14 18 }
15 19  
16 20 int sandbox_fs_read_at(const char *filename, loff_t pos, void *buffer,