diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2003-10-26 11:16:15 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2003-10-26 11:16:15 +0000 |
commit | b47fa98b919743be8d38665d19cf138eea198ec7 (patch) | |
tree | 1e5ee123b5d33f4f76458b8982f8c9b6ecaa917d /firmware | |
parent | b47c580207cc09fdcc3b08ef0324fb8dd034ddd4 (diff) | |
download | rockbox-b47fa98b919743be8d38665d19cf138eea198ec7.tar.gz rockbox-b47fa98b919743be8d38665d19cf138eea198ec7.zip |
Better error reporting
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3986 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/fat.c | 6 |
1 files 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(); |