]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - fs/fat/file.c
fat: replace LINEAR_PREFETCH_SIZE with PREFETCH_BLOCKS
[karo-tx-uboot.git] / fs / fat / file.c
index 514dbaecba8129bdb62c318ee7ac281530aacccd..59c5d37cdc714208836e66ccd51d19632228350b 100644 (file)
@@ -32,8 +32,6 @@
 #include <linux/stat.h>
 #include <linux/time.h>
 
-#if defined(CONFIG_CMD_FAT)
-
 /* Supported filesystems */
 static const struct filesystem filesystems[] = {
        { file_fat_detectfs,  file_fat_ls,  file_fat_read,  "FAT" },
@@ -50,12 +48,12 @@ char file_cwd[CWD_LEN+1] = "/";
 const char *
 file_getfsname(int idx)
 {
-       if (idx < 0 || idx >= NUM_FILESYS) return NULL;
+       if (idx < 0 || idx >= NUM_FILESYS)
+               return NULL;
 
        return filesystems[idx].name;
 }
 
-
 static void
 pathcpy(char *dest, const char *src)
 {
@@ -74,15 +72,14 @@ pathcpy(char *dest, const char *src)
                        return;
                }
                ++dest;
-               if (ISDIRDELIM(*src)) {
+
+               if (ISDIRDELIM(*src))
                        while (ISDIRDELIM(*src)) src++;
-               } else {
+               else
                        src++;
-               }
        } while (1);
 }
 
-
 int
 file_cd(const char *path)
 {
@@ -143,7 +140,6 @@ file_cd(const char *path)
        return 0;
 }
 
-
 int
 file_detectfs(void)
 {
@@ -162,7 +158,6 @@ file_detectfs(void)
        return current_filesystem;
 }
 
-
 int
 file_ls(const char *dir)
 {
@@ -183,7 +178,6 @@ file_ls(const char *dir)
        return filesystems[current_filesystem].ls(arg);
 }
 
-
 long
 file_read(const char *filename, void *buffer, unsigned long maxsize)
 {
@@ -204,5 +198,3 @@ file_read(const char *filename, void *buffer, unsigned long maxsize)
 
        return filesystems[current_filesystem].read(arg, buffer, maxsize);
 }
-
-#endif