[PATCH v2 01/11] cmd: fs: Add generic mkdir implementation
Marek Vasut
marex at denx.de
Thu Mar 13 20:13:17 CET 2025
Add generic implementation of the 'mkdir' command to create directories
in filesystems using the generic filesystem API.
Reviewed-by: Tom Rini <trini at konsulko.com>
Signed-off-by: Marek Vasut <marex at denx.de>
---
Cc: Baruch Siach <baruch at tkos.co.il>
Cc: Francesco Dolcini <francesco.dolcini at toradex.com>
Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
Cc: Hiago De Franco <hiago.franco at toradex.com>
Cc: Ilias Apalodimas <ilias.apalodimas at linaro.org>
Cc: Nam Cao <namcao at linutronix.de>
Cc: Simon Glass <sjg at chromium.org>
Cc: Sughosh Ganu <sughosh.ganu at linaro.org>
Cc: Tom Rini <trini at konsulko.com>
Cc: u-boot at lists.denx.de
---
V2: Add RB from Tom
---
cmd/fs.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/cmd/fs.c b/cmd/fs.c
index 3faf7627447..bccc3a129bd 100644
--- a/cmd/fs.c
+++ b/cmd/fs.c
@@ -85,6 +85,20 @@ U_BOOT_CMD(
" device type 'interface' instance 'dev'."
);
+static int do_mkdir_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
+{
+ return do_mkdir(cmdtp, flag, argc, argv, FS_TYPE_ANY);
+}
+
+U_BOOT_CMD(
+ mkdir, 4, 1, do_mkdir_wrapper,
+ "create a directory",
+ "<interface> [<dev[:part]>] <directory>\n"
+ " - Create a directory 'directory' of partition 'part' on\n"
+ " device type 'interface' instance 'dev'."
+);
+
static int do_fstype_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
--
2.47.2
More information about the U-Boot
mailing list