From: Marek Vasut Date: Mon, 17 Mar 2025 03:12:41 +0000 (+0100) Subject: cmd: fs: Add generic rm implementation X-Git-Tag: v2025.07-rc1~119^2~13^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa4c9826e222136b9257247bbbb64408437d1906;p=pandora-u-boot.git 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 Signed-off-by: Marek Vasut --- 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", + " [] \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[]) {