diff options
author | Stephen Warren <swarren@nvidia.com> | 2014-06-12 10:28:32 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-06-23 15:37:23 -0600 |
commit | 4d907025d6a530c0f3d2e869331e863c3e3cc3c2 (patch) | |
tree | 13136d24960b410c33dc758b6f0a5097664c53a0 /common/cmd_sandbox.c | |
parent | dbb7234b2a5e7d2cdb6658156de8d2d5b54033d7 (diff) | |
download | u-boot-imx-4d907025d6a530c0f3d2e869331e863c3e3cc3c2.zip u-boot-imx-4d907025d6a530c0f3d2e869331e863c3e3cc3c2.tar.gz u-boot-imx-4d907025d6a530c0f3d2e869331e863c3e3cc3c2.tar.bz2 |
sandbox: restore ability to access host fs through standard commands
Commit 95fac6ab4589 "sandbox: Use os functions to read host device tree"
removed the ability for get_device_and_partition() to handle the "host"
device type, and redirect accesses to it to the host filesystem. This
broke some unit tests that use this feature. So, revert that change. The
code added back by this patch is slightly different to pacify checkpatch.
However, we're then left with "host" being both:
- A pseudo device that accesses the hosts real filesystem.
- An emulated block device, which accesses "sectors" inside a file stored
on the host.
In order to resolve this discrepancy, rename the pseudo device from host
to hostfs, and adjust the unit-tests for this change.
The "help sb" output is modified to reflect this rename, and state where
the host and hostfs devices should be used.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/cmd_sandbox.c')
-rw-r--r-- | common/cmd_sandbox.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/common/cmd_sandbox.c b/common/cmd_sandbox.c index 00982b1..3d9fce7 100644 --- a/common/cmd_sandbox.c +++ b/common/cmd_sandbox.c @@ -114,11 +114,13 @@ static int do_sandbox(cmd_tbl_t *cmdtp, int flag, int argc, U_BOOT_CMD( sb, 8, 1, do_sandbox, "Miscellaneous sandbox commands", - "load host <dev> <addr> <filename> [<bytes> <offset>] - " + "load hostfs - <addr> <filename> [<bytes> <offset>] - " "load a file from host\n" - "sb ls host <filename> - list files on host\n" - "sb save host <dev> <filename> <addr> <bytes> [<offset>] - " + "sb ls hostfs - <filename> - list files on host\n" + "sb save hostfs - <filename> <addr> <bytes> [<offset>] - " "save a file to host\n" "sb bind <dev> [<filename>] - bind \"host\" device to file\n" - "sb info [<dev>] - show device binding & info" + "sb info [<dev>] - show device binding & info\n" + "sb commands use the \"hostfs\" device. The \"host\" device is used\n" + "with standard IO commands such as fatls or ext2load" ); |