From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akashi, Takahiro Date: Tue, 11 Sep 2018 15:59:15 +0900 Subject: [U-Boot] [PATCH v3 19/26] cmd: fat: add fatrm command In-Reply-To: <20180911065922.19141-1-takahiro.akashi@linaro.org> References: <20180911065922.19141-1-takahiro.akashi@linaro.org> Message-ID: <20180911065922.19141-20-takahiro.akashi@linaro.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: AKASHI Takahiro In this patch, a new command, fatrm, is added so as to delete a file or directory. Signed-off-by: AKASHI Takahiro --- cmd/fat.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cmd/fat.c b/cmd/fat.c index b685bf70a2b3..4b9a7eaab054 100644 --- a/cmd/fat.c +++ b/cmd/fat.c @@ -152,6 +152,18 @@ U_BOOT_CMD( " to 'dev' on 'interface'" ); +static int do_fat_rm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + return do_rm(cmdtp, flag, argc, argv, FS_TYPE_FAT); +} + +U_BOOT_CMD( + fatrm, 4, 1, do_fat_rm, + "delete a file", + " [] \n" + " - delete a file from 'dev' on 'interface'" +); + static int do_fat_mkdir(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { -- 2.18.0