Add generic implementation of the 'rm' command to delete files from filesystems using the generic filesystem API.
Signed-off-by: Marek Vasut <ma...@denx.de> --- Cc: Baruch Siach <bar...@tkos.co.il> Cc: Francesco Dolcini <francesco.dolc...@toradex.com> Cc: Heinrich Schuchardt <xypron.g...@gmx.de> Cc: Hiago De Franco <hiago.fra...@toradex.com> Cc: Ilias Apalodimas <ilias.apalodi...@linaro.org> Cc: Nam Cao <nam...@linutronix.de> Cc: Simon Glass <s...@chromium.org> Cc: Sughosh Ganu <sughosh.g...@linaro.org> Cc: Tom Rini <tr...@konsulko.com> Cc: u-boot@lists.denx.de --- cmd/fs.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cmd/fs.c b/cmd/fs.c index df1f24207de..25c0005e8a3 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[]) { -- 2.47.2