summaryrefslogtreecommitdiffstats
path: root/apps/codecs/mp3_enc.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-04-25 19:53:34 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-04-25 19:53:34 +0000
commit205ec3279d32a152f6046ecc6ad66c39f097fa4d (patch)
treefa8bb607ebae23a0b43428ea6850797af83b57a0 /apps/codecs/mp3_enc.c
parent2a2b8d8a8234633779dca0fff5e7ce23ad4c48ed (diff)
downloadrockbox-205ec3279d32a152f6046ecc6ad66c39f097fa4d.tar.gz
rockbox-205ec3279d32a152f6046ecc6ad66c39f097fa4d.zip
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
Diffstat (limited to 'apps/codecs/mp3_enc.c')
-rw-r--r--apps/codecs/mp3_enc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/apps/codecs/mp3_enc.c b/apps/codecs/mp3_enc.c
index daa6cfefa6..08cbb18f03 100644
--- a/apps/codecs/mp3_enc.c
+++ b/apps/codecs/mp3_enc.c
@@ -2329,11 +2329,9 @@ static bool on_start_file(struct enc_file_event_data *data)
static bool on_end_file(struct enc_file_event_data *data)
{
- if (!is_file_data_ok(data))
+ if (!is_file_data_ok(data) || ci->close(data->rec_file) != 0)
return false;
- ci->fsync(data->rec_file);
- ci->close(data->rec_file);
data->rec_file = -1;
return true;