From 8bad6cb176a0e92ac8e7771fb68e5e0713edbf8e Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Fri, 5 Jan 2018 02:45:21 +0200 Subject: fs: fat: Drop CONFIG_SUPPORT_VFAT fat.h unconditionally defines CONFIG_SUPPORT_VFAT (and has done since 2003), so as a result VFAT support is always enabled regardless of whether a board config defines it or not. Drop this unnecessary option. Signed-off-by: Tuomas Tynkkynen --- fs/fat/fat.c | 12 +----------- fs/fat/fat_write.c | 3 +-- 2 files changed, 2 insertions(+), 13 deletions(-) (limited to 'fs') diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 1283818761..dd7888cd6d 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -22,12 +22,6 @@ #include #include -#ifdef CONFIG_SUPPORT_VFAT -static const int vfat_enabled = 1; -#else -static const int vfat_enabled = 0; -#endif - /* * Convert a string to lowercase. Converts at most 'len' characters, * 'len' may be larger than the length of 'str' if 'str' is NULL @@ -605,9 +599,6 @@ static int get_fs_info(fsdata *mydata) return -1; } - if (vfat_enabled) - debug("VFAT Support enabled\n"); - debug("FAT%d, fat_sect: %d, fatlength: %d\n", mydata->fatsize, mydata->fat_sect, mydata->fatlength); debug("Rootdir begins at cluster: %d, sector: %d, offset: %x\n" @@ -857,8 +848,7 @@ static int fat_itr_next(fat_itr *itr) continue; if (dent->attr & ATTR_VOLUME) { - if (vfat_enabled && - (dent->attr & ATTR_VFAT) == ATTR_VFAT && + if ((dent->attr & ATTR_VFAT) == ATTR_VFAT && (dent->name[0] & LAST_LONG_ENTRY_MASK)) { dent = extract_vfat_name(itr); if (!dent) diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c index cd65192da5..2b753df282 100644 --- a/fs/fat/fat_write.c +++ b/fs/fat/fat_write.c @@ -819,8 +819,7 @@ static dir_entry *find_directory_entry(fsdata *mydata, int startsect, continue; } if ((dentptr->attr & ATTR_VOLUME)) { - if (vfat_enabled && - (dentptr->attr & ATTR_VFAT) && + if ((dentptr->attr & ATTR_VFAT) && (dentptr->name[0] & LAST_LONG_ENTRY_MASK)) { get_long_file_name(mydata, curclust, get_dentfromdir_block, -- cgit v1.2.1