diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2003-12-08 21:58:38 +0000 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2003-12-08 21:58:38 +0000 |
| commit | ae960a9ece0552d1982e56e26cc4c3932f51f2ab (patch) | |
| tree | cba0485d0dfa7febd5f751e2636c27919eb55551 /firmware/common | |
| parent | 8b813d0b99bcda14d6101ea38cc8ebb498281675 (diff) | |
| download | rockbox-ae960a9ece0552d1982e56e26cc4c3932f51f2ab.zip rockbox-ae960a9ece0552d1982e56e26cc4c3932f51f2ab.tar.gz rockbox-ae960a9ece0552d1982e56e26cc4c3932f51f2ab.tar.bz2 rockbox-ae960a9ece0552d1982e56e26cc4c3932f51f2ab.tar.xz | |
my take at fixing the simulator warnings by adding mode_t, size_t, ssize_t
and off_t
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4116 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/common')
| -rw-r--r-- | firmware/common/file.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/firmware/common/file.c b/firmware/common/file.c index b4b879f..f81038f 100644 --- a/firmware/common/file.c +++ b/firmware/common/file.c @@ -52,7 +52,7 @@ static struct filedesc openfiles[MAX_OPEN_FILES]; static int flush_cache(int fd); -int creat(const char *pathname, int mode) +int creat(const char *pathname, mode_t mode) { (void)mode; return open(pathname, O_WRONLY|O_CREAT|O_TRUNC); @@ -307,7 +307,7 @@ int rename(const char* path, const char* newpath) return 0; } -int ftruncate(int fd, unsigned int size) +int ftruncate(int fd, off_t size) { int rc, sector; struct filedesc* file = &openfiles[fd]; @@ -513,22 +513,22 @@ static int readwrite(int fd, void* buf, int count, bool write) return nread; } -int write(int fd, void* buf, int count) +ssize_t write(int fd, const void* buf, size_t count) { if (!openfiles[fd].write) { errno = EACCES; return -1; } - return readwrite(fd, buf, count, true); + return readwrite(fd, (void *)buf, count, true); } -int read(int fd, void* buf, int count) +ssize_t read(int fd, void* buf, size_t count) { return readwrite(fd, buf, count, false); } -int lseek(int fd, int offset, int whence) +off_t lseek(int fd, off_t offset, int whence) { int pos; int newsector; |