summaryrefslogtreecommitdiff
path: root/cmd/host.c
diff options
context:
space:
mode:
authorStefan Brüns <stefan.bruens@rwth-aachen.de>2016-08-11 22:52:04 +0200
committerSimon Glass <sjg@chromium.org>2016-09-18 21:04:38 -0600
commit49afb37988a397ce215e99563e0ab5d2970c6a39 (patch)
tree536619d45a82b01fd351c6210bcf46d0ee29dc77 /cmd/host.c
parent2945eb73dd988cbd9775395128935256deb9a96e (diff)
sandbox: Add "host size" hostfs command for fs test
This complements the size/fatsize/ext4size commands added in commit cf6598193aed5de8855eaf70c1994f2bc437255a load, save and ls are already implemented for hostfs, now tests can cover the same operations on hostfs and emulated block devices. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd/host.c')
-rw-r--r--cmd/host.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/host.c b/cmd/host.c
index 8d84415301..b427e541f1 100644
--- a/cmd/host.c
+++ b/cmd/host.c
@@ -25,6 +25,12 @@ static int do_host_ls(cmd_tbl_t *cmdtp, int flag, int argc,
return do_ls(cmdtp, flag, argc, argv, FS_TYPE_SANDBOX);
}
+static int do_host_size(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
+{
+ return do_size(cmdtp, flag, argc, argv, FS_TYPE_SANDBOX);
+}
+
static int do_host_save(cmd_tbl_t *cmdtp, int flag, int argc,
char * const argv[])
{
@@ -138,6 +144,7 @@ static cmd_tbl_t cmd_host_sub[] = {
U_BOOT_CMD_MKENT(load, 7, 0, do_host_load, "", ""),
U_BOOT_CMD_MKENT(ls, 3, 0, do_host_ls, "", ""),
U_BOOT_CMD_MKENT(save, 6, 0, do_host_save, "", ""),
+ U_BOOT_CMD_MKENT(size, 3, 0, do_host_size, "", ""),
U_BOOT_CMD_MKENT(bind, 3, 0, do_host_bind, "", ""),
U_BOOT_CMD_MKENT(info, 3, 0, do_host_info, "", ""),
U_BOOT_CMD_MKENT(dev, 0, 1, do_host_dev, "", ""),
@@ -174,6 +181,7 @@ U_BOOT_CMD(
"host ls hostfs - <filename> - list files on host\n"
"host save hostfs - <addr> <filename> <bytes> [<offset>] - "
"save a file to host\n"
+ "host size hostfs - <filename> - determine size of file on host"
"host bind <dev> [<filename>] - bind \"host\" device to file\n"
"host info [<dev>] - show device binding & info\n"
"host dev [<dev>] - Set or retrieve the current host device\n"