summaryrefslogtreecommitdiff
path: root/fs/fat/file.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-07-19 11:37:00 +0200
committerWolfgang Denk <wd@denx.de>2010-07-24 20:54:46 +0200
commit7385c28e9b5f7d47e6a8f1ad9800e6e70af714e2 (patch)
tree37b184114c60e541b301d8d23a72c46743e85cb4 /fs/fat/file.c
parent226fa9bb9ed7e3f0642cb47b26bef44ca7b9d7b9 (diff)
downloadu-boot-imx-7385c28e9b5f7d47e6a8f1ad9800e6e70af714e2.zip
u-boot-imx-7385c28e9b5f7d47e6a8f1ad9800e6e70af714e2.tar.gz
u-boot-imx-7385c28e9b5f7d47e6a8f1ad9800e6e70af714e2.tar.bz2
fs/fat: Big code cleanup.
- reformat - throw out macros like FAT_DPRINT and FAT_DPRINT - remove dead code Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'fs/fat/file.c')
-rw-r--r--fs/fat/file.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/fs/fat/file.c b/fs/fat/file.c
index e870734..59c5d37 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)
{