From b47fa98b919743be8d38665d19cf138eea198ec7 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Sun, 26 Oct 2003 11:16:15 +0000 Subject: Better error reporting git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3986 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/fat.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index 079bf1ea10..4caa233635 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c @@ -1274,6 +1274,7 @@ int fat_truncate(struct fat_file *file) int fat_closewrite(struct fat_file *file, int size, int attr) { + int rc; LDEBUGF("fat_closewrite(size=%d)\n",size); if (!size) { @@ -1285,8 +1286,9 @@ int fat_closewrite(struct fat_file *file, int size, int attr) } if (file->dircluster) - if (update_short_entry(file, size, attr) < 0) - return -1; + rc = update_short_entry(file, size, attr); + if (rc < 0) + return rc * 10 - 1; flush_fat(); -- cgit v1.2.3