diff options
author | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-19 15:56:25 +0200 |
---|---|---|
committer | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-19 15:56:25 +0200 |
commit | 8e07c1db6ba4bedd0f8fe537a6fb0ca80e5d25f4 (patch) | |
tree | 08df626a28c290f5cde43424dd62dd43fc441a35 /src/user/lib/libc/tce | |
parent | 0d2f7645c3fb45d83497faf2a4b6fff8c3f175d1 (diff) | |
download | TCE-8e07c1db6ba4bedd0f8fe537a6fb0ca80e5d25f4.tar.gz TCE-8e07c1db6ba4bedd0f8fe537a6fb0ca80e5d25f4.zip |
Better sprintf, vsprintf, String::sprintf, etc.
Diffstat (limited to 'src/user/lib/libc/tce')
-rw-r--r-- | src/user/lib/libc/tce/syscall.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/user/lib/libc/tce/syscall.c b/src/user/lib/libc/tce/syscall.c index 80e0e0e..acdcc51 100644 --- a/src/user/lib/libc/tce/syscall.c +++ b/src/user/lib/libc/tce/syscall.c @@ -25,7 +25,7 @@ void process_exit(int retval) { call(SC_PROCESS_EXIT, retval, 0, 0, 0, 0); } -void printk(char* str) { +void printk(const char* str) { call(SC_PRINTK, (unsigned)str, 0, 0, 0, 0); } @@ -75,7 +75,7 @@ void brk(void* ptr) { // ********** proc -int run(char* filename, char** args, FILE zero_fd) { +int run(const char* filename, const char** args, FILE zero_fd) { return call(SC_RUN, (unsigned)filename, (unsigned)args, (unsigned)zero_fd, 0, 0); } @@ -85,19 +85,19 @@ int waitpid(int p, int block) { // ********** file -FILE open(char* filename, int mode) { +FILE open(const char* filename, int mode) { return call(SC_OPEN, (unsigned)filename, mode, 0, 0, 0); } -FILE open_relative(FILE root, char* filename, int mode) { +FILE open_relative(FILE root, const char* filename, int mode) { return call(SC_OPEN_RELATIVE, root, (unsigned) filename, mode, 0, 0); } -int stat(char* filename, file_info *info) { +int stat(const char* filename, file_info *info) { return call(SC_STAT, (unsigned) filename, (unsigned) info, 0, 0, 0); } -int stat_relative(FILE root, char* filename, file_info *info) { +int stat_relative(FILE root, const char* filename, file_info *info) { return call(SC_STAT_RELATIVE, root, (unsigned) filename, (unsigned) info, 0, 0); } @@ -113,10 +113,10 @@ int read(FILE file, size_t offset, size_t len, char *buffer) { return call(SC_READ, file, offset, len, (unsigned) buffer, 0); } -int write(FILE file, size_t offset, size_t len, char* buffer) { +int write(FILE file, size_t offset, size_t len, const char* buffer) { return call(SC_WRITE, file, offset, len, (unsigned) buffer, 0); } -int link(char* from, char* to, int mode) { +int link(const char* from, const char* to, int mode) { return call(SC_LINK, (unsigned) from, (unsigned)to, mode, 0, 0); } |