]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
sandbox: only do sandboxfs for hostfs interface
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Mon, 13 Apr 2015 20:54:19 +0000 (22:54 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 20:29:05 +0000 (22:29 +0200)
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>
fs/sandbox/sandboxfs.c

index a920bc087712ff289c65eec948f0f234229f9f5c..5acfc03704a9b35d9f823637ffac86e06f051208 100644 (file)
 
 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,