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: 968430 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="LD0lhz0e"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 428bST1hWKz9s1x for ; Tue, 11 Sep 2018 17:02:01 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id C9A34C21E68; Tue, 11 Sep 2018 07:01:20 +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-Google-Smtp-Source: ANB0Vdb1O5ceThBia6CD5EYTVZlPJafHr1lE03iyyjl85wfeitf2OlPholIqM4G0eQRqzbptQ1Ahsw== 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;