diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/Kconfig | 13 | ||||
-rw-r--r-- | fs/fat/Kconfig | 2 | ||||
-rw-r--r-- | fs/fat/fat.c | 14 | ||||
-rw-r--r-- | fs/fat/fat_write.c | 7 | ||||
-rw-r--r-- | fs/fs.c | 2 |
5 files changed, 20 insertions, 18 deletions
diff --git a/fs/ext4/Kconfig b/fs/ext4/Kconfig index e69de29bb2..1a913d2b6d 100644 --- a/fs/ext4/Kconfig +++ b/fs/ext4/Kconfig @@ -0,0 +1,13 @@ +config FS_EXT4 + bool "Enable ext4 filesystem support" + help + This provides support for reading images from the ext4 filesystem. + ext4 is a widely used general-purpose filesystem for Linux. + You can also enable CMD_EXT4 to get access to ext4 commands. + +config EXT4_WRITE + bool "Enable ext4 filesystem write support" + depends on FS_EXT4 + help + This provides support for creating and writing new files to an + existing ext4 filesystem partition. diff --git a/fs/fat/Kconfig b/fs/fat/Kconfig index e7978aae67..9bb11eac9f 100644 --- a/fs/fat/Kconfig +++ b/fs/fat/Kconfig @@ -14,7 +14,7 @@ config FAT_WRITE existing FAT filesystem partition. config FS_FAT_MAX_CLUSTSIZE - int "Set maximum possible clusersize" + int "Set maximum possible clustersize" default 65536 depends on FS_FAT help diff --git a/fs/fat/fat.c b/fs/fat/fat.c index d16883fa10..dd7888cd6d 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -22,12 +22,6 @@ #include <linux/compiler.h> #include <linux/ctype.h> -#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) @@ -1106,7 +1096,7 @@ int file_fat_read_at(const char *filename, loff_t pos, void *buffer, if (ret) goto out_free_both; - printf("reading %s\n", filename); + debug("reading %s\n", filename); ret = get_contents(&fsdata, itr->dent, pos, buffer, maxsize, actread); out_free_both: diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c index 9d2e0ed74c..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, @@ -842,8 +841,8 @@ static dir_entry *find_directory_entry(fsdata *mydata, int startsect, get_name(dentptr, s_name); - if (strcmp(filename, s_name) - && strcmp(filename, l_name)) { + if (strncasecmp(filename, s_name, sizeof(s_name)) && + strncasecmp(filename, l_name, sizeof(l_name))) { debug("Mismatch: |%s|%s|\n", s_name, l_name); dentptr++; @@ -407,7 +407,7 @@ int fs_read(const char *filename, ulong addr, loff_t offset, loff_t len, /* If we requested a specific number of bytes, check we got it */ if (ret == 0 && len && *actread != len) - printf("** %s shorter than offset + len **\n", filename); + debug("** %s shorter than offset + len **\n", filename); fs_close(); return ret; |