diff options
author | Sean Anderson <sean.anderson@seco.com> | 2022-03-22 16:59:20 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-04-01 15:03:13 -0400 |
commit | f676b45151c33986501e5f8f9bcc64f4a9511089 (patch) | |
tree | 7a893e7f077239f473c820069f054d25ec1d6d37 /disk | |
parent | 8e1c9fe243a31a0b0a40a80cc20fc3c06246d675 (diff) | |
download | u-boot-f676b45151c33986501e5f8f9bcc64f4a9511089.tar.gz u-boot-f676b45151c33986501e5f8f9bcc64f4a9511089.tar.bz2 u-boot-f676b45151c33986501e5f8f9bcc64f4a9511089.zip |
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.c | 4 |
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 |