Better error reporting

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3986 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2003-10-26 11:16:15 +00:00
parent b47c580207
commit b47fa98b91

View file

@ -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();