From patchwork Tue Sep 11 06:59:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 146402 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3312285ljw; Tue, 11 Sep 2018 00:01:46 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZAB78ebILuaXRUkQqMWfQxbrJneSiElK3ST3ff+UPx9gh5jLMGA9n74V61XLox1V2X33es X-Received: by 2002:a50:98c1:: with SMTP id j59-v6mr27200095edb.212.1536649306221; Tue, 11 Sep 2018 00:01:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536649306; cv=none; d=google.com; s=arc-20160816; b=lpzmH4xgaagH09mllePdSFHQSQ1+/71OkxRZ+KtohfCTPEtTZYq0clI+klbRnZLsfA /GVNDHSKDte5CcF82Y1xGmxXcDA6/p5O5mFkU1smvy131gf6gpD1JdCzLbvgY8zEViSE Ty11e9vlr/OiXNICupeZQo/3WLc1LZ1jtCoEixP5Hij3q3ep5NccO7vs3kpSQhW2r/XO G4zJkT1ReHEzxwj8t2zhMzHF0uw7JbAf1aw2WOrGZAb0Cyn5Yz2T0ONByWDvlCCpZ8SO 8jEhYNVjOamBce3quuyKjqko/cwIzmJPFl2T1INa7WGHWaaq/v5ATqAin2K+F5nm8SWK EzQg== 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=KJ0W4AgnmDNh21ps7wgONtwIDhWSnZl4NK/NNPLb2oo=; b=NFwx4962dB5f0VMouUj/vUJ3UDj97ajw3UBK7wqDhyz0CBv2C3LFH4tkT2ICq6SYt6 Dydxa2Zm2ON2RLMdbe6vZzFpQnxzcYOtCqkdTPhlLfQku2MEbVO0eCkqnIkHI/kc9Zac g5VpHMoZhCL4wTX70KyajiGMWAOZsa1jCT63CYmXL6J1QuQT+9nc2rxuayn++HjO6xiD MtC/Fn+vtTgmzAr4fQfq67B7LMs6H7FG42ehIX/dfhtVYG4K1o1p9bTt8EztPT3HdoFV StEuEl4z4c2brwhWzt83/XeWmg/8Nbr3cGFR0TVhCCpWk8ukWlrsWuIeU7f9ihD1Mr87 9GTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=LD0lhz0e; 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 g14-v6si1545001edv.426.2018.09.11.00.01.45; Tue, 11 Sep 2018 00:01:46 -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=LD0lhz0e; 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 C2894C21EE0; Tue, 11 Sep 2018 07:01:19 +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 9BC07C21E62; Tue, 11 Sep 2018 06:59:45 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 16FE7C21E44; Tue, 11 Sep 2018 06:59:28 +0000 (UTC) Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by lists.denx.de (Postfix) with ESMTPS id 8050CC21EAE for ; Tue, 11 Sep 2018 06:59:23 +0000 (UTC) Received: by mail-pf1-f194.google.com with SMTP id j8-v6so11740156pff.6 for ; Mon, 10 Sep 2018 23:59:23 -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=ctFj8Pr+H4tXDOL9qPjkWMRjj/pmNWHvYPWLNrAU8iM=; b=LD0lhz0eRv+YzL0f8VgszSea1SyKZnoj5JXslYEz18HQBksFhPPlzerrxi/h1iS8Dz jCg7qtXoxh25DyYDLBjOhhWJK2XoJS2/ZXP+aDATruOzyhlI1tjgEiAf6POhipakqtQC A8Pz9NOVJBq4nyc6YPjAIr/EUFsDe8APxtY78= 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=ctFj8Pr+H4tXDOL9qPjkWMRjj/pmNWHvYPWLNrAU8iM=; b=Jwoqfo2Bstg5qnKiYrGFVbPoY/wDHCKXNAJTUo7McTjJPh6Z4XhHm4voQ/LId8KROr aRo+cDKQTrz7cJR0rYOuAAX07b3q2aBI1/NqaPWOFV55IyR1yBxagOiiICwSg7xLw4Xf AmVTUzdcZQsZOR00YZlAUODS4k7+SxEYpHs3RcPmKbwQ9UrCMh1DoXAWjTPtv/JjiObA bMgXagtlVBsMqpvBUl6H4dJIHqNvlrgHbS1RTvL4AmP4jRPaBA0hhh1qbNvEZEHC197c Xe+ixNtSlttrSY16TQg92eLZd6SAqhjJWAEuA756ZJmrTsVe6cEaO6yjuGKpasOknDc/ Jt8Q== X-Gm-Message-State: APzg51ALyBGA3/+m0EVA0e3yRbaEsn+yWDqptSvJSrVKAZwyZWU6GvVp BJZTf+MBYwD7pojwZaS98K+C3w== X-Received: by 2002:a62:1a8f:: with SMTP id a137-v6mr27740295pfa.190.1536649162010; Mon, 10 Sep 2018 23:59:22 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id g5-v6sm29820367pfc.77.2018.09.10.23.59.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Sep 2018 23:59:21 -0700 (PDT) From: "Akashi, Takahiro" To: trini@konsulko.com Date: Tue, 11 Sep 2018 15:59:01 +0900 Message-Id: <20180911065922.19141-6-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 05/26] 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" From: AKASHI Takahiro 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;