forked from len0rd/rockbox
Renamed flush() to fsync() to be more in line with POSIX/unix
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3766 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
df12a2fe9f
commit
a4baacd3ec
3 changed files with 5 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue