From patchwork Mon Jan 2 16:54:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 133914 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 628041007D2 for ; Tue, 3 Jan 2012 06:28:15 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 22C8728345; Mon, 2 Jan 2012 20:28:12 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5kkKxAck-7YD; Mon, 2 Jan 2012 20:28:11 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 223FF28313; Mon, 2 Jan 2012 20:28:10 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CF65828251 for ; Mon, 2 Jan 2012 17:02:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Cpokx5pKocXu for ; Mon, 2 Jan 2012 17:02:18 +0100 (CET) X-Greylist: delayed 401 seconds by postgrey-1.27 at theia; Mon, 02 Jan 2012 17:02:16 CET X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail.dev.rtsoft.ru (mail.dev.rtsoft.ru [213.79.90.226]) by theia.denx.de (Postfix) with SMTP id CEA6328249 for ; Mon, 2 Jan 2012 17:02:16 +0100 (CET) Received: (qmail 23501 invoked from network); 2 Jan 2012 15:55:34 -0000 Received: from unknown (HELO wasted.dev.rtsoft.ru) (192.168.1.70) by 0 with SMTP; 2 Jan 2012 15:55:34 -0000 To: u-boot@lists.denx.de Content-Disposition: inline From: Sergei Shtylyov Organization: MontaVista Software Inc. Date: Mon, 2 Jan 2012 19:54:29 +0300 MIME-Version: 1.0 Message-Id: <201201021954.29410.sshtylyov@ru.mvista.com> X-Mailman-Approved-At: Mon, 02 Jan 2012 20:28:07 +0100 Cc: Martin Mueller Subject: [U-Boot] [PATCH] fat: reset VFAT short alias checksum on first match X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de The VFAT short alias checksum read from a long file name is only overwritten when another long file name appears in a directory list. Until then it renders short file names invisible that have the same checksum. Reset the checksum on first match. Signed-off-by: Sergei Shtylyov Signed-off-by: Martin Mueller --- fs/fat/fat.c | 2 ++ 1 file changed, 2 insertions(+) Index: u-boot/fs/fat/fat.c =================================================================== --- u-boot.orig/fs/fat/fat.c +++ u-boot/fs/fat/fat.c @@ -633,6 +633,7 @@ static dir_entry *get_dentfromdir (fsdat } #ifdef CONFIG_SUPPORT_VFAT if (dols && mkcksum(dentptr->name) == prevcksum) { + prevcksum = 0xffff; dentptr++; continue; } @@ -963,6 +964,7 @@ do_fat_read (const char *filename, void #ifdef CONFIG_SUPPORT_VFAT else if (dols == LS_ROOT && mkcksum(dentptr->name) == prevcksum) { + prevcksum = 0xffff; dentptr++; continue; }