From 7385c28e9b5f7d47e6a8f1ad9800e6e70af714e2 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Mon, 19 Jul 2010 11:37:00 +0200 Subject: fs/fat: Big code cleanup. - reformat - throw out macros like FAT_DPRINT and FAT_DPRINT - remove dead code Signed-off-by: Wolfgang Denk --- fs/fat/file.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'fs/fat/file.c') diff --git a/fs/fat/file.c b/fs/fat/file.c index e870734402..59c5d37cdc 100644 --- a/fs/fat/file.c +++ b/fs/fat/file.c @@ -48,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) { @@ -72,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) { @@ -141,7 +140,6 @@ file_cd(const char *path) return 0; } - int file_detectfs(void) { @@ -160,7 +158,6 @@ file_detectfs(void) return current_filesystem; } - int file_ls(const char *dir) { @@ -181,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) { -- cgit v1.2.1