diff options
Diffstat (limited to 'src/user/lib/libc/tce')
-rw-r--r-- | src/user/lib/libc/tce/syscall.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/user/lib/libc/tce/syscall.c b/src/user/lib/libc/tce/syscall.c index acdcc51..f4f1333 100644 --- a/src/user/lib/libc/tce/syscall.c +++ b/src/user/lib/libc/tce/syscall.c @@ -75,7 +75,7 @@ void brk(void* ptr) { // ********** proc -int run(const char* filename, const char** args, FILE zero_fd) { +int run(const char* filename, const char** args, int zero_fd) { return call(SC_RUN, (unsigned)filename, (unsigned)args, (unsigned)zero_fd, 0, 0); } @@ -85,36 +85,36 @@ int waitpid(int p, int block) { // ********** file -FILE open(const char* filename, int mode) { +int open(const char* filename, int mode) { return call(SC_OPEN, (unsigned)filename, mode, 0, 0, 0); } -FILE open_relative(FILE root, const char* filename, int mode) { - return call(SC_OPEN_RELATIVE, root, (unsigned) filename, mode, 0, 0); +int open_relative(int root_fd, const char* filename, int mode) { + return call(SC_OPEN_RELATIVE, root_fd, (unsigned) filename, mode, 0, 0); } int stat(const char* filename, file_info *info) { return call(SC_STAT, (unsigned) filename, (unsigned) info, 0, 0, 0); } -int stat_relative(FILE root, const char* filename, file_info *info) { - return call(SC_STAT_RELATIVE, root, (unsigned) filename, (unsigned) info, 0, 0); +int stat_relative(int root_fd, const char* filename, file_info *info) { + return call(SC_STAT_RELATIVE, root_fd, (unsigned) filename, (unsigned) info, 0, 0); } -int statf(FILE file, file_info *info) { - return call(SC_STATF, file, (unsigned)info, 0, 0, 0); +int statf(int file_fd, file_info *info) { + return call(SC_STATF, file_fd, (unsigned)info, 0, 0, 0); } -void close(FILE file) { - call(SC_CLOSE, file, 0, 0, 0, 0); +void close(int fd) { + call(SC_CLOSE, fd, 0, 0, 0, 0); } -int read(FILE file, size_t offset, size_t len, char *buffer) { - return call(SC_READ, file, offset, len, (unsigned) buffer, 0); +int read(int fd, size_t offset, size_t len, char *buffer) { + return call(SC_READ, fd, offset, len, (unsigned) buffer, 0); } -int write(FILE file, size_t offset, size_t len, const char* buffer) { - return call(SC_WRITE, file, offset, len, (unsigned) buffer, 0); +int write(int fd, size_t offset, size_t len, const char* buffer) { + return call(SC_WRITE, fd, offset, len, (unsigned) buffer, 0); } int link(const char* from, const char* to, int mode) { |