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:
parent
2a2b8d8a82
commit
205ec3279d
6 changed files with 21 additions and 22 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue