diff options
author | Jens Arnold <amiconn@rockbox.org> | 2007-02-01 23:08:15 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2007-02-01 23:08:15 +0000 |
commit | 67eb154146ea90cd25a383bcdd4a028704ef2218 (patch) | |
tree | 06b528a996b0ab59b4b3f2b950069c56046a7a10 /firmware | |
parent | 98dc093317b615b2aa8ffe8d140945d75764a813 (diff) | |
download | rockbox-67eb154146ea90cd25a383bcdd4a028704ef2218.tar.gz rockbox-67eb154146ea90cd25a383bcdd4a028704ef2218.zip |
Removed 'mode' parameter from creat(). It wasn't pure posix anyway, it was ignored on target and mixed into 'oflags' in the simulator. * Simplified io.c a bit by defining a dummy O_BINARY for OSes which don't have that.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12179 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/common/file.c | 3 | ||||
-rw-r--r-- | firmware/font.c | 2 | ||||
-rw-r--r-- | firmware/include/file.h | 6 |
3 files changed, 5 insertions, 6 deletions
diff --git a/firmware/common/file.c b/firmware/common/file.c index e24b44ce1f..830a7eef8a 100644 --- a/firmware/common/file.c +++ b/firmware/common/file.c @@ -52,9 +52,8 @@ static struct filedesc openfiles[MAX_OPEN_FILES]; static int flush_cache(int fd); -int creat(const char *pathname, mode_t mode) +int creat(const char *pathname) { - (void)mode; return open(pathname, O_WRONLY|O_CREAT|O_TRUNC); } diff --git a/firmware/font.c b/firmware/font.c index 40f99b330d..6b1f51a24e 100644 --- a/firmware/font.c +++ b/firmware/font.c @@ -522,7 +522,7 @@ void glyph_cache_save(void) if (fnt_file >= 0) { - glyph_file = creat(GLYPH_CACHE_FILE, O_WRONLY); + glyph_file = creat(GLYPH_CACHE_FILE); if (glyph_file < 0) return; diff --git a/firmware/include/file.h b/firmware/include/file.h index 3db6507290..7b4b99aa79 100644 --- a/firmware/include/file.h +++ b/firmware/include/file.h @@ -48,7 +48,7 @@ #ifdef SIMULATOR #define open(x,y) sim_open(x,y) -#define creat(x,y) sim_creat(x,y) +#define creat(x) sim_creat(x) #define remove(x) sim_remove(x) #define rename(x,y) sim_rename(x,y) #define filesize(x) sim_filesize(x) @@ -59,7 +59,7 @@ typedef int (*open_func)(const char* pathname, int flags); typedef ssize_t (*read_func)(int fd, void *buf, size_t count); -typedef int (*creat_func)(const char *pathname, mode_t mode); +typedef int (*creat_func)(const char *pathname); typedef ssize_t (*write_func)(int fd, const void *buf, size_t count); typedef void (*qsort_func)(void *base, size_t nmemb, size_t size, int(*_compar)(const void *, const void *)); @@ -69,7 +69,7 @@ extern int close(int fd); extern int fsync(int fd); extern ssize_t read(int fd, void *buf, size_t count); extern off_t lseek(int fildes, off_t offset, int whence); -extern int creat(const char *pathname, mode_t mode); +extern int creat(const char *pathname); extern ssize_t write(int fd, const void *buf, size_t count); extern int remove(const char* pathname); extern int rename(const char* path, const char* newname); |