diff options
author | dzwdz | 2022-07-29 19:06:23 +0200 |
---|---|---|
committer | dzwdz | 2022-07-29 19:06:23 +0200 |
commit | 2cdc815322af6c7c22b9ceb371d9c7b2a4853c0e (patch) | |
tree | 98023777a62a533a3ac1d68ef99bcdd8bbee685e /src/kernel/syscalls.c | |
parent | a658e1068eb2f849736931d2b99bcb6290c7ec0a (diff) |
syscall/write: WRITE_TRUNCATE
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r-- | src/kernel/syscalls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index 0dec4c5..4537ff5 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -233,7 +233,7 @@ long _syscall_read(handle_t handle_num, void __user *buf, size_t len, long offse long _syscall_write(handle_t handle_num, const void __user *buf, size_t len, long offset, int flags) { struct handle *h = process_handle_get(process_current, handle_num); if (!h) SYSCALL_RETURN(-1); - if (flags != 0) + if (flags & ~(WRITE_TRUNCATE)) SYSCALL_RETURN(-ENOSYS); switch (h->type) { case HANDLE_FILE: |