Better error reporting
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3986 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b47c580207
commit
b47fa98b91
1 changed files with 4 additions and 2 deletions
|
@ -1274,6 +1274,7 @@ int fat_truncate(struct fat_file *file)
|
||||||
|
|
||||||
int fat_closewrite(struct fat_file *file, int size, int attr)
|
int fat_closewrite(struct fat_file *file, int size, int attr)
|
||||||
{
|
{
|
||||||
|
int rc;
|
||||||
LDEBUGF("fat_closewrite(size=%d)\n",size);
|
LDEBUGF("fat_closewrite(size=%d)\n",size);
|
||||||
|
|
||||||
if (!size) {
|
if (!size) {
|
||||||
|
@ -1285,8 +1286,9 @@ int fat_closewrite(struct fat_file *file, int size, int attr)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file->dircluster)
|
if (file->dircluster)
|
||||||
if (update_short_entry(file, size, attr) < 0)
|
rc = update_short_entry(file, size, attr);
|
||||||
return -1;
|
if (rc < 0)
|
||||||
|
return rc * 10 - 1;
|
||||||
|
|
||||||
flush_fat();
|
flush_fat();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue