diff options
author | dzwdz | 2021-09-20 19:30:37 +0200 |
---|---|---|
committer | dzwdz | 2021-09-20 19:30:37 +0200 |
commit | 6371724809b057b25a4efd6c022e7d95068c42f1 (patch) | |
tree | 5cc6484ae767cd27f2ae4ccd24c0fb01e9beb163 /src/init/main.c | |
parent | 9a08099fb7148a69b0655f0e559661b1021b17b5 (diff) |
add an offset parameter to read() and write()
Diffstat (limited to 'src/init/main.c')
-rw-r--r-- | src/init/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/init/main.c b/src/init/main.c index 66d4b2b..1e2d16f 100644 --- a/src/init/main.c +++ b/src/init/main.c @@ -4,7 +4,7 @@ #include <stdint.h> #define argify(str) str, sizeof(str) - 1 -#define log(str) _syscall_write(tty_fd, argify(str)) +#define log(str) _syscall_write(tty_fd, argify(str), 0) extern char _bss_start; // provided by the linker extern char _bss_end; @@ -34,15 +34,15 @@ void read_file(const char *path, size_t len) { static char buf[64]; int buf_len = 64; - _syscall_write(tty_fd, path, len); + _syscall_write(tty_fd, path, len, 0); log(": "); if (fd < 0) { log("couldn't open.\n"); return; } - buf_len = _syscall_read(fd, buf, buf_len); - _syscall_write(tty_fd, buf, buf_len); + buf_len = _syscall_read(fd, buf, buf_len, 0); + _syscall_write(tty_fd, buf, buf_len, 0); _syscall_close(fd); } |