summaryrefslogtreecommitdiff
path: root/cmd/fat.c
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2018-09-11 15:59:11 +0900
committerAlexander Graf <agraf@suse.de>2018-09-23 21:55:30 +0200
commit0349da51009211b540a8653795dee5d4b872fd3b (patch)
tree03635b2920ac3970e6a38e77e7d7f1c0df36ab6f /cmd/fat.c
parent31a18d570d968a01582bea900002a86d1c9e17e6 (diff)
downloadu-boot-0349da51009211b540a8653795dee5d4b872fd3b.tar.gz
cmd: fat: add fatmkdir command
In this patch, a new command, fatmkdir, is added. Please note that, as there is no notion of "current directory" on u-boot, a directory name specified must contains an absolute directory path as a parent directory. Otherwise, "/" (root directory) is assumed. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'cmd/fat.c')
-rw-r--r--cmd/fat.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/cmd/fat.c b/cmd/fat.c
index 2a5f7bfc26..b685bf70a2 100644
--- a/cmd/fat.c
+++ b/cmd/fat.c
@@ -151,4 +151,17 @@ U_BOOT_CMD(
" - write file 'filename' from the address 'addr' in RAM\n"
" to 'dev' on 'interface'"
);
+
+static int do_fat_mkdir(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
+{
+ return do_mkdir(cmdtp, flag, argc, argv, FS_TYPE_FAT);
+}
+
+U_BOOT_CMD(
+ fatmkdir, 4, 1, do_fat_mkdir,
+ "create a directory",
+ "<interface> [<dev[:part]>] <directory>\n"
+ " - create a directory in 'dev' on 'interface'"
+);
#endif