summaryrefslogtreecommitdiff
path: root/disk
diff options
context:
space:
mode:
authorSean Anderson <sean.anderson@seco.com>2022-03-22 16:59:20 -0400
committerTom Rini <trini@konsulko.com>2022-04-01 15:03:13 -0400
commitf676b45151c33986501e5f8f9bcc64f4a9511089 (patch)
tree7a893e7f077239f473c820069f054d25ec1d6d37 /disk
parent8e1c9fe243a31a0b0a40a80cc20fc3c06246d675 (diff)
fs: Add semihosting filesystem
This adds a filesystem which is backed by the host's filesystem. It is modeled off of sandboxfs, which has very similar aims. Semihosting doesn't support listing directories (except with SYS_SYSTEM), so neither do we. it's possible to optimize a bit for the common case of reading a whole file by omitting a call to smh_seek, but this is left as a future optimization. Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Diffstat (limited to 'disk')
-rw-r--r--disk/part.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/disk/part.c b/disk/part.c
index 49e39a24e8..b95405bb49 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -455,7 +455,7 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
int part;
struct disk_partition tmpinfo;
-#ifdef CONFIG_SANDBOX
+#if IS_ENABLED(CONFIG_SANDBOX) || IS_ENABLED(CONFIG_SEMIHOSTING)
/*
* Special-case a pseudo block device "hostfs", to allow access to the
* host's own filesystem.
@@ -467,7 +467,7 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
info->blksz = 0;
info->bootable = 0;
strcpy((char *)info->type, BOOT_PART_TYPE);
- strcpy((char *)info->name, "Sandbox host");
+ strcpy((char *)info->name, "Host filesystem");
#if CONFIG_IS_ENABLED(PARTITION_UUIDS)
info->uuid[0] = 0;
#endif