From patchwork Tue Sep 4 07:49:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 145862 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3368141ljw; Tue, 4 Sep 2018 00:57:51 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZBk5TVOMEMKuLEKcw231WpOEPkS4nz+j/mUCQX3NyE1T23eo45RFA1disUajA8vYJgfE85 X-Received: by 2002:aa7:c708:: with SMTP id i8-v6mr35854479edq.231.1536047871875; Tue, 04 Sep 2018 00:57:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536047871; cv=none; d=google.com; s=arc-20160816; b=ucTfsP6j9W14wbrEorhumuuDyQ/C3RMU2mKyIRPzQJubaLS0KmnfR+q7Lf/g+KBbWw bfAJgpfKRFHcdzledstJv7rMhv5Jx0cMlyLjVD1P8hoEUx/H9APtg1hjGZSjblmXDD8Z WqnBBqgxqd/VGIQ4YpqdnZzhbZntHudNzEF/03mXI2Mu5jWzpaHt+++lvEx//10LnEAz egmy0ryRe7DIjZkAsihtxn+6QOdwe6opU2kKhJJf2AJwa61dCa/U2rmG5kAW/vZyuTd+ KENdgw+3xTB271PQo9PuApZevOHsohLP8NNPuUUtIJHy2IW83CA7z0oYJNMsWVijJOpk 2KDQ== 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:arc-authentication-results; bh=VgVazMn0ShOotXyqddOFg5J8E068Jwri8TQnsLAjKP0=; b=knAtaEsLg4GPD2kNU0DRAIU1MRHu4fMpoTuN5T2EyRikeVv2vz3WKOROS+6czecBQL +kagvoN8QgnzzA3p+K5BYwFgtVfmgm5CSkQNHYlmv9SprD3vcr/WjPFJ/33lsy15sJLb RwjTMO2EPJU4ZTTPeEMx0n7ArqvEKjLjgR8q//Vh7m+cBCtaW2WxQKV+jTsUjMXz4EkF MsaIdPjXBuPtVPfZLD4fT86EJTdJ4rkS+4yKqlJo7mBYf/FJGaN9kQEyLFMvCA4iwsMy QhqZ074krl9yLIPG97QlvVRA9i+AkmgHk2Cz7qQGitC+3wLYr0uHrIp0X9ncv9phjvn7 ovTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="T0SKw/lM"; 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 v2-v6si569881edr.368.2018.09.04.00.57.51; Tue, 04 Sep 2018 00:57:51 -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="T0SKw/lM"; 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 7F54FC21EE8; Tue, 4 Sep 2018 07:52:21 +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 B6B73C21F29; Tue, 4 Sep 2018 07:52:11 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id BFDE3C21F3C; Tue, 4 Sep 2018 07:51:03 +0000 (UTC) Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by lists.denx.de (Postfix) with ESMTPS id 3E2BAC21EFB for ; Tue, 4 Sep 2018 07:51:00 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id x6-v6so1232141plv.10 for ; Tue, 04 Sep 2018 00:51: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=SpBE0UKMVzI1Iv0u8PblzyD9AHUB5mxIHYIZanYQK7c=; b=T0SKw/lMRxygkhoRIEYLNaRKKanjOn9gHXyjXkE4HF3e1JP4uFkTsg3KKunJEF5Qp4 VjC9cRte+LbyhV5ZLzleszCsCNj76s3FEzK3y79oASwQRzdD6zLqb/nrsAv3nSLXnJPP Ghf+Y2DxPI/iEa/mJY41Gj2D2s8PD3WKfJiTU= 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=SpBE0UKMVzI1Iv0u8PblzyD9AHUB5mxIHYIZanYQK7c=; b=h9NUbaWtVaSl+KAFBFGfFt2DPFhdaAPNGf6SOqUrGPlhGJzFo/zFqZKFRzQ+A76d7r bfT0mcNcHubV1o9vP/9X0LXC5DFcQluChch+cB6nRYj6N/B9IVC6ULM8wvetHRPdW6EY aRGl0NlfgGsZ5q36cG41dRLXNeR4AdRmPjyzq7FYvyia670tPNd78Xnd8FydgimFN12A 5zmbbl7VtozFPuzU6U7YO1n9K8qnVdjKK1hQ00AwhJO9QiiSlfSBEztC8uWL5j519F/n MH2nx2YvIxAgnn1rJJSuwCR1UTnxMnFDSn4XguC6w9z57TEFLH9SzXI0Ay5otU6Ky6Gk Mplw== X-Gm-Message-State: APzg51DQ6VcIFw8TVaHzX1I4IfNKgd1p3A+GnCCpxVc+FvBTSj4EEwXh BtlSzAXADcPnPynJKytPSgOXrQ== X-Received: by 2002:a17:902:722:: with SMTP id 31-v6mr32164185pli.207.1536047458931; Tue, 04 Sep 2018 00:50:58 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id t86-v6sm28221836pfe.109.2018.09.04.00.50.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Sep 2018 00:50:58 -0700 (PDT) From: AKASHI Takahiro To: trini@konsulko.com Date: Tue, 4 Sep 2018 16:49:31 +0900 Message-Id: <20180904074948.18146-7-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180904074948.18146-1-takahiro.akashi@linaro.org> References: <20180904074948.18146-1-takahiro.akashi@linaro.org> Cc: xypron.glpk@gmx.de, agraf@suse.de, u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 06/23] Revert "fs: fat: cannot write to subdirectories" 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" This reverts commit 0dc1bfb7302d220a48364263d5632d6d572b069b. The succeeding patch series will supersede it. Signed-off-by: AKASHI Takahiro --- fs/fat/fat_write.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c index 27e0ff66966c..3b77557b3ede 100644 --- a/fs/fat/fat_write.c +++ b/fs/fat/fat_write.c @@ -909,11 +909,9 @@ static int do_fat_write(const char *filename, void *buffer, loff_t size, volume_info volinfo; fsdata datablock; fsdata *mydata = &datablock; - int cursect, i; + int cursect; int ret = -1, name_len; char l_filename[VFAT_MAXLEN_BYTES]; - char bad[2] = " "; - const char illegal[] = "<>:\"/\\|?*"; *actwrite = size; dir_curclust = 0; @@ -973,18 +971,6 @@ static int do_fat_write(const char *filename, void *buffer, loff_t size, } dentptr = (dir_entry *) do_fat_read_at_block; - /* Strip leading (back-)slashes */ - while ISDIRDELIM(*filename) - ++filename; - /* Check that the filename is valid */ - for (i = 0; i < strlen(illegal); ++i) { - *bad = illegal[i]; - if (strstr(filename, bad)) { - printf("FAT: illegal filename (%s)\n", filename); - return -1; - } - } - name_len = strlen(filename); if (name_len >= VFAT_MAXLEN_BYTES) name_len = VFAT_MAXLEN_BYTES - 1;