X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=fs%2Ffat%2Ffile.c;h=59c5d37cdc714208836e66ccd51d19632228350b;hb=a8f6ab5229fb4cd8299df84c8698e128b5125a8e;hp=514dbaecba8129bdb62c318ee7ac281530aacccd;hpb=b8685affe614ccf5f4ec66252b30e2e524d18948;p=karo-tx-uboot.git diff --git a/fs/fat/file.c b/fs/fat/file.c index 514dbaecba..59c5d37cdc 100644 --- a/fs/fat/file.c +++ b/fs/fat/file.c @@ -32,8 +32,6 @@ #include #include -#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