diff options
author | Alex AUVOLAT <alexis211@gmail.com> | 2013-06-08 23:09:52 +0200 |
---|---|---|
committer | Alex AUVOLAT <alexis211@gmail.com> | 2013-06-08 23:09:52 +0200 |
commit | 4d65fcb9a8b6c7c6fd5a3390c46a96d11b6a80d4 (patch) | |
tree | c193acf64ff2db985f6664f161cf586c3caeb684 /src/user/lib/libc/tce/syscall.c | |
parent | eae9997d3c2dbaef53022ddabe61c1800a619499 (diff) | |
download | TCE-4d65fcb9a8b6c7c6fd5a3390c46a96d11b6a80d4.tar.gz TCE-4d65fcb9a8b6c7c6fd5a3390c46a96d11b6a80d4.zip |
All FWIK is deleted. YOSH is now pure C. Not-working KBASIC included.
Diffstat (limited to 'src/user/lib/libc/tce/syscall.c')
-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) { |