diff options
author | dzwdz | 2021-08-24 16:25:50 +0200 |
---|---|---|
committer | dzwdz | 2021-08-24 16:25:50 +0200 |
commit | 83fa1f34ea744da7d26997179a0dd6af751dd8b0 (patch) | |
tree | 0794348a02acebf36ecab9ad665bc0f0f75fbfee /src/init | |
parent | 2df1c7370bf596aebbe06f7333a65a6f4d6ec15a (diff) |
add some scaffolding for file descriptors
Diffstat (limited to 'src/init')
-rw-r--r-- | src/init/syscalls.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/init/syscalls.c b/src/init/syscalls.c index 0be7917..4f207db 100644 --- a/src/init/syscalls.c +++ b/src/init/syscalls.c @@ -24,6 +24,18 @@ int _syscall_mount(const char *path, int len, fd_t fd) { return _syscall(_SYSCALL_MOUNT, (int)path, len, fd); } +int _syscall_fd_read(fd_t fd, char *buf, int len) { + return _syscall(_SYSCALL_FD_READ, fd, (int)buf, len); +} + +int _syscall_fd_write(fd_t fd, char *buf, int len) { + return _syscall(_SYSCALL_FD_WRITE, fd, (int)buf, len); +} + +int _syscall_fd_close(fd_t fd) { + return _syscall(_SYSCALL_FD_CLOSE, fd, 0, 0); +} + int _syscall_debuglog(const char *msg, size_t len) { return _syscall(_SYSCALL_DEBUGLOG, (int)msg, len, 0); } |