1
0
Fork 0
forked from len0rd/rockbox

Make recording complain about every little file I/O problem (error on close() failure and fsync() failure). Why? I guess we will find out the disk is full about 1/2 sector sooner on average when the file APIs actually detect this correctly. :/

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13262 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2007-04-25 19:53:34 +00:00
parent 2a2b8d8a82
commit 205ec3279d
6 changed files with 21 additions and 22 deletions

View file

@ -294,13 +294,12 @@ static bool on_end_file(struct enc_file_event_data *data)
ci->write(data->rec_file, &h.wpmdh, sizeof (h.wpmdh))
!= sizeof (h.wpmdh) ||
ci->write(data->rec_file, &h.rhdr, sizeof (h.rhdr))
!= sizeof (h.rhdr))
!= sizeof (h.rhdr) ||
ci->close(data->rec_file) != 0 )
{
return false;
}
ci->fsync(data->rec_file);
ci->close(data->rec_file);
data->rec_file = -1;
return true;