summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorMarek Vasut <[email protected]>2025-03-17 04:12:41 +0100
committerTom Rini <[email protected]>2025-04-02 20:00:59 -0600
commitfa4c9826e222136b9257247bbbb64408437d1906 (patch)
tree046156e52e63c8010f135ed7296d58e1f575f041 /cmd
parent52227015c54c1177d0b29fd2857201ecf99a4f65 (diff)
cmd: fs: Add generic rm implementation
Add generic implementation of the 'rm' command to delete files from filesystems using the generic filesystem API. Reviewed-by: Tom Rini <[email protected]> Signed-off-by: Marek Vasut <[email protected]>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/fs.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/cmd/fs.c b/cmd/fs.c
index bccc3a129bd..7f1ab8f0fd2 100644
--- a/cmd/fs.c
+++ b/cmd/fs.c
@@ -99,6 +99,20 @@ U_BOOT_CMD(
" device type 'interface' instance 'dev'."
);
+static int do_rm_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
+{
+ return do_rm(cmdtp, flag, argc, argv, FS_TYPE_ANY);
+}
+
+U_BOOT_CMD(
+ rm, 4, 1, do_rm_wrapper,
+ "delete a file",
+ "<interface> [<dev[:part]>] <filename>\n"
+ " - delete a file with the name 'filename' on\n"
+ " device type 'interface' instance 'dev'."
+);
+
static int do_fstype_wrapper(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{