cmd: fs: Add generic mkdir implementation

Add generic implementation of the 'mkdir' command to create directories
in filesystems using the generic filesystem API.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Marek Vasut <marex@denx.de>
This commit is contained in:
Marek Vasut
2025-03-17 04:12:40 +01:00
committed by Tom Rini
parent 3baec72dcb
commit 52227015c5

View File

@@ -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[])
{