From patchwork Tue Sep 11 06:59:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 146420 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3322258ljw; Tue, 11 Sep 2018 00:13:16 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb0N9nP34a0cdY+WtiowXkok5cS6COxsgIVzDU/r+3HLEAcdMxX13LUkGDgXX3rr/+WSnT/ X-Received: by 2002:a50:c8c3:: with SMTP id k3-v6mr26682347edh.193.1536649996489; Tue, 11 Sep 2018 00:13:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536649996; cv=none; d=google.com; s=arc-20160816; b=Nnn8LlgHEdurvjAHVECDYKR3gAICO4Yj7x/Kw76+xXxoyB1A3ia/epywKudxwr1zEd aHWVQyeGDxe9E3aD/OBJ8eeaqJ61Ugzfmp1kxDGsZSn9K54tEBnFFiiQZkob1V69jQJw gISBaGd2QWmQCAD4FiW4NuuM+swwJ7zLnu7KMaF7crUUb1c9RsjRGx9ffqE0Stz3phGT Kx48N5qEErnWhZto+5g3FQ5fMjm1TVLTGw14ZfPfsJcvGXfITYddzTHThYlqNGGM9ElN moxJABNcqbcrYShfxbEgvIQ8/CBhsokUb/Mu9k1Wq2TkNurwQpJNuhndmZDGKK0SDtA0 /1QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature; bh=foKekA0O3THAciU4L42jgVpzWyxS/OtiJDh5ZCnQDTs=; b=0BJleIK6L42OuWvRf8rHMS8vVB43Bcda1fBBJ86pQxhYbRXP+JaIC94lA7yOsK5Uv7 uw66NFzYwtojLdA6l/R1TKUeAg0by3JABG/o0EAgjPlhcnXALAhzbIyPIZ/R1+bG6ojm der6vQ8zkt1P/2Llu+VIk63HafiZWThZ4UMIk4PhmLEyXOOKY6bkZiuHOXWMeKcnhDYH mWwWSFNtS2+33CKgcKr44hUaqtENe1QBFpHXOFD3NlS14BpRwyeF/PKoxJfF3ptZgrYi pFfeO7u/WPM+XNQWHucr/Pg1dMvIskGtpmAU+qPGYX4U8tJRbV9CELn2DE0ZvC0dCo3S EeAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=WEIYMuZE; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id z36-v6si736004edd.71.2018.09.11.00.13.16; Tue, 11 Sep 2018 00:13:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=WEIYMuZE; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 0C154C21E4E; Tue, 11 Sep 2018 07:06:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 0C241C21F06; Tue, 11 Sep 2018 07:01:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5FCAEC21E18; Tue, 11 Sep 2018 07:00:23 +0000 (UTC) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by lists.denx.de (Postfix) with ESMTPS id BACFDC21EFF for ; Tue, 11 Sep 2018 07:00:16 +0000 (UTC) Received: by mail-pf1-f180.google.com with SMTP id x17-v6so11751884pfh.5 for ; Tue, 11 Sep 2018 00:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+Nm0L2LvUSrM9BJZKd7IaUsRyE5BVM1LGYlzIHTxAR8=; b=WEIYMuZEW+9gX5A0tANGxcrqltfdCDHQAEaIZ0vAingLi2dd/63acziOcIGj2FgN6+ k8Kw5lUZH9mPMNwHVH2SG5AUJiOoJW7rLhS3pw7ly3NY083e2c7YpVF23YFo4HwZsQWI oq2a0lVYfw4BmMEbmAysFqvhbTcz38wWAG/7Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+Nm0L2LvUSrM9BJZKd7IaUsRyE5BVM1LGYlzIHTxAR8=; b=G9pu+Rtr5ESX0R1NvX3YD2TpF3lr+xkY/SvKgi/IshRKC9xfna4wKveAwUoioMXHqB 0FTQ9wPxAISs2i/7Ms3ajQiwPrNrnA+U5ZZaQOsqlvb/y+ATLgo1F0hpN8H2ueDYjTLU Ve8tK3GE/jX/AJrrA1am15mf/ecOV/+YwVphF/LRxUV8PJ7HIDq8eEPiCFO5Ueg5p2bQ hAB1YKpTqngXIznJUEGnxDmN//O8K9PNpNfZk7ctDq+bjf09BDwjzlAG7itje2abErWF HhkdQKuUkZ+D5I5mqwzG105kGi0KrZ/Z+B+m4+hiky++T2xgcy9Zx3GlvlfATBTrqh6E zl5Q== X-Gm-Message-State: APzg51Awn6f+mzpGTRD4Dbzc6EmojgtOIjo4iA3fwPs5spadU0ZT2aw1 w4M9bWRG2iBFxdZFJDwHsoiyIg== X-Received: by 2002:a63:1064:: with SMTP id 36-v6mr26536107pgq.254.1536649215496; Tue, 11 Sep 2018 00:00:15 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id l9-v6sm22119733pgg.79.2018.09.11.00.00.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Sep 2018 00:00:14 -0700 (PDT) From: "Akashi, Takahiro" To: trini@konsulko.com Date: Tue, 11 Sep 2018 15:59:15 +0900 Message-Id: <20180911065922.19141-20-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180911065922.19141-1-takahiro.akashi@linaro.org> References: <20180911065922.19141-1-takahiro.akashi@linaro.org> Cc: u-boot@lists.denx.de, xypron.glpk@gmx.de, agraf@suse.de Subject: [U-Boot] [PATCH v3 19/26] cmd: fat: add fatrm command X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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[]) {