forked from len0rd/rockbox
flush_cache() failure should still return error.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3433 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
188be8ec57
commit
3ca8d3589e
1 changed files with 2 additions and 2 deletions
|
@ -406,10 +406,10 @@ static int readwrite(int fd, void* buf, int count, bool write)
|
|||
}
|
||||
|
||||
/* if buffer has been modified, write it back to disk */
|
||||
if (count && file->dirty) {
|
||||
if (nread && file->dirty) {
|
||||
rc = flush_cache(fd);
|
||||
if (rc < 0)
|
||||
return nread ? nread : rc * 10 - 3;
|
||||
return rc * 10 - 3;
|
||||
}
|
||||
|
||||
/* read whole sectors right into the supplied buffer */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue