From patchwork Sun Nov 29 02:02:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1407779 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.a=rsa-sha256 header.s=badeba3b8450 header.b=U2e5Ueco; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CkBX308Nfz9s0b for ; Sun, 29 Nov 2020 13:05:06 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 60850827A4; Sun, 29 Nov 2020 03:03:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="U2e5Ueco"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BE97282779; Sun, 29 Nov 2020 03:02:59 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 814EF8274A for ; Sun, 29 Nov 2020 03:02:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1606615349; bh=2ExQanTB7Kjf8MnmeQo0725hytL88xyK3+2kJ5uxQrM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=U2e5UecoBBVQBH3Ca5Qv17t7wp5U0y5xxJkVW4LLISGrXA938X3KPBU1x14c4cwVN fnS5qObrMpu+e3G+LqGqXYzHV/upV4JmdnGzk6jv4e5DJsDF0Sl1iRqaT9dIO2jRBZ OK3pWn6iuHBI9YVFnPhD2++mRhXqLT3e8rDZAxsQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from mcbin.fritz.box ([62.143.246.89]) by mail.gmx.com (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MS3ir-1kbsj80bil-00TTMc; Sun, 29 Nov 2020 03:02:29 +0100 From: Heinrich Schuchardt To: Tom Rini Cc: Simon Glass , Christian Gmeiner , Jason Wessel , AKASHI Takahiro , Marek Szyprowski , Bin Meng , Reuben Dowle , Marcin Juszkiewicz , Thomas Hebb , Samer El-Haj-Mahmoud , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH 02/18] fs: fat: directory entries starting with 0x05 Date: Sun, 29 Nov 2020 03:02:00 +0100 Message-Id: <20201129020216.4865-3-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201129020216.4865-1-xypron.glpk@gmx.de> References: <20201129020216.4865-1-xypron.glpk@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:ncUavtdN+FvqBgeiHcQ3LR2i+kUwk7zGS41RjmrWnf0T1TMPbWC DTp16kmz9dB+PlPcvrqU8ADmLva3vK699WXbWFKdIuNHJ3WGrl82DoYpUSOjLVj2TpYmTr+ JREHMUrgYxM15sO9JV45k+Xvwhr10G01DqJxYBDlWBERmO8jtxxtG7fOt+j4XO7aApZkIPI ON3pHu8BiQzH8J1sBYSZg== X-UI-Out-Filterresults: notjunk:1;V03:K0:e1xC4rgASqc=:sb90jTlz8hRmj3H9ih8oEf 3qprjx3ixN+Y8wVRcif+x8MWa6PWz5Rqd4963wh579Wb5pVGYmy1mSodBTWeMJrTmaapRg6hA iQYZdIEzHo1eG4yRjJVPzOO3MQwS0PiCgDCUjPxSNIK86GLD00WRX0pdYyA9Wq+vyr+LhW4T6 dmBUPr+WhsIBlEazMTM5gZa0FBemFFz69El6xiVbOr7mir/+4p7GpO4fAH7j9kQ8qMQhXxCWy eEfqhisKbdkIFIj68MOfOos/3vNECcWn+pmGlrYdHxgWXizMu4yusGBMsOzLmB71gYxRzFEdW W1XsQH0zvKxNwTluG15vG8wy0+CDmQ3zaYg87CgpE3RfqRwbIkdq4rZQxb847CNckt7Hju+xn swIGqPKBH7ABJb8188F2fdZQastXVEuyU8htKsdUa7RMFQfAkTy0kKKUgPCoRqaQuaOBnjtVY vFLoGI61hPso91c06tZGJ78MZ5ELJY1KSOHFgRMQL5OYkMPYJHMpyMZe2zqpjWQ3TIICmjTvm 3drghHp4on3aQffR8HpRb9a5BiWipLGk8D0DzV5CZDVYgF2r6T4ERK4sqdKuQ7Z8MPfRQWQ7q 5hUtnUM6yvjqYRijRUWCjuogO1xtF5MJA1hBrPxwaASlJH8ZffpSQrKK6+lsrQtdzAKePLB2P WYOPLkaR/8IfhUXi3ePV4f9nEZBZZ8GbQq+OgyBUTAdOW8TNt2Cew0YLguKWlwXBP7zwuPSYp c/PfcgDJhEJJEWVhTH381NsGbdoBr9oBjhx9N4IOc47134VpukUGzLqCZi149Uq84VQZlgq/i KcEryfGEUiNEz3WnjLrVU1AS2fJXbCr88ck4J9SPRYUwO28ZcBLEiHu0lDrSKhMfYxPKJaFiU h/vLSdlQ6vju+cNzLU6w== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean 0x05 is used as replacement letter for 0xe5 at the first position of short file names. We must not skip over directory entries starting with 0x05. Cf. Microsoft FAT Specification, August 30 2005 Fixes: 39606d462c97 ("fs: fat: handle deleted directory entries correctly") Signed-off-by: Heinrich Schuchardt Reviewed-by: Christian Gmeiner Reviewed-by: Simon Glass --- fs/fat/fat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.29.2 diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 28aa5aaa9f..fb6ba89466 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -926,8 +926,7 @@ static int fat_itr_next(fat_itr *itr) if (!dent) return 0; - if (dent->name[0] == DELETED_FLAG || - dent->name[0] == aRING) + if (dent->name[0] == DELETED_FLAG) continue; if (dent->attr & ATTR_VOLUME) {