From patchwork Tue Sep 11 06:59:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 146413 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3319627ljw; Tue, 11 Sep 2018 00:10:15 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbO96pSK4fLPtL8+83XlBAaITsWOTCcbZvl29kja7zbLnlDt6d/ydwC1bqsDbB+RHTLle8M X-Received: by 2002:a50:cf42:: with SMTP id d2-v6mr27537945edk.242.1536649815775; Tue, 11 Sep 2018 00:10:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536649815; cv=none; d=google.com; s=arc-20160816; b=SSzWP2+n4mBx/8WVhkla/pxRFquecxG2UCF9G0nA/wQMbP1ScWWgD1gmXoQo6S9rP3 lBTxQW1d13nJflUOeraNuSyoMrYg0D8JAOIdCdVCcfN1rHZVCjlgJ+2l6XqYaPLnTB1g txAV3JqYY/OxDp6s6dbv0kKYVqcZQHHtlfDIhDMIDGTQ7raMHWAc+P6zp/pkxnONVo9g Y81r8RP1wiR6C2r2j8brpLnqmu88ooObVWpWCBABYDqOVBNWqk/o1qyxumRDxMFNfkho cwHlzwXs6bamYgmllaqL7CnjaTL3UZk0I/Rr4En3PrNK+VtTtBsGf7aJJcpPimxEAxFj r1wA== 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=SCAz4Do97pMJ4kNLSCKJ7edKRwp4NgRvdMb8Br2XmIc=; b=CNR0voWSSmMAkidLL1KaDbKfdKtF3CyY+sMVzP+88K5xZBNcVetq9DdWgBWPA9yieC L4WwXCkVHV6d9UvyXptQmWT4OP9PasrCIWc4qpN6qMlE/6TgFfGmUasxsAd+aM6g+eja KKH3EJH+xu2x1vuEgGgY5IzN3gJP462u+eGfZZkRcNv9BfLOm3bPS9gsNaDtE6fapYn8 LJ2rHJykkKGCurzBvl+X+YOU+KlkKBzaNv965T51ixLom1T5Vs0O9gEq5Sb6Wmd0j/FJ 3uT3iyXNrpqeyWZJiDUP5jnRt9iAd9Qs8/tfVF5JeeTPK1BJTkyDxHBwKEi5LN+VYS/H SD6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Vlv7LspI; 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 h25-v6si864124edb.423.2018.09.11.00.10.15; Tue, 11 Sep 2018 00:10:15 -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=Vlv7LspI; 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 D83C2C21EBE; Tue, 11 Sep 2018 07:08:10 +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=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 06605C21E1E; Tue, 11 Sep 2018 07:01:25 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2E5F6C21E1E; Tue, 11 Sep 2018 07:00:07 +0000 (UTC) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by lists.denx.de (Postfix) with ESMTPS id 1BCC7C21EF0 for ; Tue, 11 Sep 2018 07:00:00 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id h69-v6so11746568pfd.4 for ; Tue, 11 Sep 2018 00:00:00 -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=4J/varR4JkH+LdOL6OeUi0ZfxUIxDMF7scG9lf1e4QE=; b=Vlv7LspI2SuT5Tkw7tdQxGVMtk/wtQLjYiHIO/YNdVZVMItLo9s09hTRtKMiGLCnT/ aLQ4+5LWzGQ0sSEooU+usWvccv9rK1OpxAhqMi37O25/3cIPFUNtFO/VPeD2Ov4LJ7av AGnLAml6PfpXi4ZVhABQT/9cPgu39dWW9QiTk= 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=4J/varR4JkH+LdOL6OeUi0ZfxUIxDMF7scG9lf1e4QE=; b=mStQ/glzMSdE7MkAZP8wBUmkDhK/la9o0e0VXU67plwpRI2FC8av3UyHf1AM5N7vtB +HtlQDS8GRDf9An3WIGqG+HtK5WOnp+BoiI+vKZ3oykT80YxseETy71OHM4qVXq2vkYW q/KytOgVs2RoWYprIEAOXJVrWaWMA2geCHWJF2jYw0AvqLyB0/PCtc7kdFHwq/9j0bbO n+vKAXWJUgUzniEyAL8kmmgq0a6lxZvcrMpHMnk/WWebWAhTuuSRJO889pcO/W2tL55l 28XhdAQIm9DVN4kIkayew17UrH7OXXqPDhCw/yRfeGyRYTS084fUd3kTdQuBvZnKJ1YP lzQQ== X-Gm-Message-State: APzg51A4HLzf8E06vEV6N3s8t2/LuZTUOLJyENoUhTxR2d7kqbbCFu6x Ljq/W+MqM7eAzmGjTNjGN+b8Zw== X-Received: by 2002:a62:591a:: with SMTP id n26-v6mr27854899pfb.94.1536649198793; Mon, 10 Sep 2018 23:59:58 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id x24-v6sm23315619pfh.67.2018.09.10.23.59.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Sep 2018 23:59:58 -0700 (PDT) From: "Akashi, Takahiro" To: trini@konsulko.com Date: Tue, 11 Sep 2018 15:59:11 +0900 Message-Id: <20180911065922.19141-16-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 15/26] cmd: fat: add fatmkdir 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, fatmkdir, is added. Please note that, as there is no notion of "current directory" on u-boot, a directory name specified must contains an absolute directory path as a parent directory. Otherwise, "/" (root directory) is assumed. Signed-off-by: AKASHI Takahiro --- cmd/fat.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cmd/fat.c b/cmd/fat.c index 2a5f7bfc2690..b685bf70a2b3 100644 --- a/cmd/fat.c +++ b/cmd/fat.c @@ -151,4 +151,17 @@ U_BOOT_CMD( " - write file 'filename' from the address 'addr' in RAM\n" " to 'dev' on 'interface'" ); + +static int do_fat_mkdir(cmd_tbl_t *cmdtp, int flag, int argc, + char * const argv[]) +{ + return do_mkdir(cmdtp, flag, argc, argv, FS_TYPE_FAT); +} + +U_BOOT_CMD( + fatmkdir, 4, 1, do_fat_mkdir, + "create a directory", + " [] \n" + " - create a directory in 'dev' on 'interface'" +); #endif