diff options
Diffstat (limited to 'firmware/common/file.c')
-rw-r--r-- | firmware/common/file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/common/file.c b/firmware/common/file.c index 01279d4421..6f86b2f8da 100644 --- a/firmware/common/file.c +++ b/firmware/common/file.c | |||
@@ -183,7 +183,7 @@ int close(int fd) | |||
183 | return -2; | 183 | return -2; |
184 | } | 184 | } |
185 | if (file->write) { | 185 | if (file->write) { |
186 | rc = flush(fd); | 186 | rc = fsync(fd); |
187 | if (rc < 0) | 187 | if (rc < 0) |
188 | return rc * 10 - 3; | 188 | return rc * 10 - 3; |
189 | } | 189 | } |
@@ -192,12 +192,12 @@ int close(int fd) | |||
192 | return 0; | 192 | return 0; |
193 | } | 193 | } |
194 | 194 | ||
195 | int flush(int fd) | 195 | int fsync(int fd) |
196 | { | 196 | { |
197 | struct filedesc* file = &openfiles[fd]; | 197 | struct filedesc* file = &openfiles[fd]; |
198 | int rc = 0; | 198 | int rc = 0; |
199 | 199 | ||
200 | LDEBUGF("flush(%d)\n", fd); | 200 | LDEBUGF("fsync(%d)\n", fd); |
201 | 201 | ||
202 | if (fd < 0 || fd > MAX_OPEN_FILES-1) { | 202 | if (fd < 0 || fd > MAX_OPEN_FILES-1) { |
203 | errno = EINVAL; | 203 | errno = EINVAL; |