From patchwork Fri Oct 2 06:06:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 525391 X-Patchwork-Delegate: trini@ti.com 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 A09341402C4 for ; Fri, 2 Oct 2015 16:06:52 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 601274B8A5; Fri, 2 Oct 2015 08:06:51 +0200 (CEST) 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 H1WHcY39zKr3; Fri, 2 Oct 2015 08:06:51 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 000C34B899; Fri, 2 Oct 2015 08:06:50 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2CAB74B896 for ; Fri, 2 Oct 2015 08:06:25 +0200 (CEST) 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 nsAfqktGCiDC for ; Fri, 2 Oct 2015 08:06:25 +0200 (CEST) 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 avon.wwwdotorg.org (avon.wwwdotorg.org [70.85.31.133]) by theia.denx.de (Postfix) with ESMTPS id DF8AF4B88C for ; Fri, 2 Oct 2015 08:06:24 +0200 (CEST) Received: from severn.wwwdotorg.org (unknown [192.168.65.5]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPS id 923FF6702; Fri, 2 Oct 2015 00:06:20 -0600 (MDT) Received: from dart.wwwdotorg.org (localhost [127.0.0.1]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by severn.wwwdotorg.org (Postfix) with ESMTPSA id 84B4CE464D; Fri, 2 Oct 2015 00:06:19 -0600 (MDT) From: Stephen Warren To: Tom Rini Date: Fri, 2 Oct 2015 00:06:09 -0600 Message-Id: <1443765973-5897-6-git-send-email-swarren@wwwdotorg.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1443765973-5897-1-git-send-email-swarren@wwwdotorg.org> References: <1443765973-5897-1-git-send-email-swarren@wwwdotorg.org> X-NVConfidentiality: public X-Virus-Scanned: clamav-milter 0.98.6 at avon.wwwdotorg.org X-Virus-Status: Clean Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH V3 06/10] fat: ffconf.h changes for U-Boot port X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 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" Turn on _FS_NORTC: This means we don't have to implement get_fattime() which simplifies life for now. Automatically set _FS_READONLY based on CONFIG_FAT_WRITE. This requires including since we reference CONFIG_*. Set _USE_LFN to enable long filename handling; an essential feature. Set _FS_RPATH so that paths components "." and ".." are correctly parsed and handled. This enables paths such as "/extlinux/../foo" to work. Set _USE_LABEL so that volume labels can be read. Signed-off-by: Stephen Warren --- fs/fat/ffconf.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/fs/fat/ffconf.h b/fs/fat/ffconf.h index f4e8e8b1c6d9..34209e0ca13c 100644 --- a/fs/fat/ffconf.h +++ b/fs/fat/ffconf.h @@ -1,3 +1,5 @@ +#include + /*---------------------------------------------------------------------------/ / FatFs - FAT file system module configuration file R0.11a (C)ChaN, 2015 /---------------------------------------------------------------------------*/ @@ -8,7 +10,11 @@ / Function Configurations /---------------------------------------------------------------------------*/ +#ifdef CONFIG_FAT_WRITE #define _FS_READONLY 0 +#else +#define _FS_READONLY 1 +#endif /* This option switches read-only configuration. (0:Read/Write or 1:Read-only) / Read-only configuration removes writing API functions, f_write(), f_sync(), / f_unlink(), f_mkdir(), f_chmod(), f_rename(), f_truncate(), f_getfree() @@ -47,7 +53,7 @@ /* This option switches fast seek feature. (0:Disable or 1:Enable) */ -#define _USE_LABEL 0 +#define _USE_LABEL 1 /* This option switches volume label functions, f_getlabel() and f_setlabel(). / (0:Disable or 1:Enable) */ @@ -90,7 +96,7 @@ */ -#define _USE_LFN 0 +#define _USE_LFN 1 #define _MAX_LFN 255 /* The _USE_LFN option switches the LFN feature. / @@ -124,7 +130,7 @@ / When _LFN_UNICODE is 0, this option has no effect. */ -#define _FS_RPATH 0 +#define _FS_RPATH 1 /* This option configures relative path feature. / / 0: Disable relative path feature and remove related functions. @@ -200,7 +206,7 @@ / data transfer. */ -#define _FS_NORTC 0 +#define _FS_NORTC 1 #define _NORTC_MON 1 #define _NORTC_MDAY 1 #define _NORTC_YEAR 2015