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 | |
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
-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) | |||
1274 | 1274 | ||
1275 | int fat_closewrite(struct fat_file *file, int size, int attr) | 1275 | int fat_closewrite(struct fat_file *file, int size, int attr) |
1276 | { | 1276 | { |
1277 | int rc; | ||
1277 | LDEBUGF("fat_closewrite(size=%d)\n",size); | 1278 | LDEBUGF("fat_closewrite(size=%d)\n",size); |
1278 | 1279 | ||
1279 | if (!size) { | 1280 | if (!size) { |
@@ -1285,8 +1286,9 @@ int fat_closewrite(struct fat_file *file, int size, int attr) | |||
1285 | } | 1286 | } |
1286 | 1287 | ||
1287 | if (file->dircluster) | 1288 | if (file->dircluster) |
1288 | if (update_short_entry(file, size, attr) < 0) | 1289 | rc = update_short_entry(file, size, attr); |
1289 | return -1; | 1290 | if (rc < 0) |
1291 | return rc * 10 - 1; | ||
1290 | 1292 | ||
1291 | flush_fat(); | 1293 | flush_fat(); |
1292 | 1294 | ||