summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/common/file.c6
-rw-r--r--firmware/include/file.h2
-rw-r--r--firmware/mpeg.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/firmware/common/file.c b/firmware/common/file.c
index 01279d4..6f86b2f 100644
--- a/firmware/common/file.c
+++ b/firmware/common/file.c
@@ -183,7 +183,7 @@ int close(int fd)
return -2;
}
if (file->write) {
- rc = flush(fd);
+ rc = fsync(fd);
if (rc < 0)
return rc * 10 - 3;
}
@@ -192,12 +192,12 @@ int close(int fd)
return 0;
}
-int flush(int fd)
+int fsync(int fd)
{
struct filedesc* file = &openfiles[fd];
int rc = 0;
- LDEBUGF("flush(%d)\n", fd);
+ LDEBUGF("fsync(%d)\n", fd);
if (fd < 0 || fd > MAX_OPEN_FILES-1) {
errno = EINVAL;
diff --git a/firmware/include/file.h b/firmware/include/file.h
index 1a2f8e5..2ea74c2 100644
--- a/firmware/include/file.h
+++ b/firmware/include/file.h
@@ -56,7 +56,7 @@ extern int remove(const char*);
#ifndef SIMULATOR
extern int open(const char* pathname, int flags);
extern int close(int fd);
-extern int flush(int fd);
+extern int fsync(int fd);
extern int read(int fd, void* buf, int count);
extern int lseek(int fd, int offset, int whence);
extern int creat(const char *pathname, int mode);
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index 57234fc..5d45523 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -1975,7 +1975,7 @@ static void mpeg_thread(void)
}
}
- rc = flush(mpeg_file);
+ rc = fsync(mpeg_file);
if(rc < 0)
panicf("rec fls: %d", rc);