summaryrefslogtreecommitdiff
path: root/src/kernel/syscalls.c
diff options
context:
space:
mode:
authordzwdz2022-07-29 19:06:23 +0200
committerdzwdz2022-07-29 19:06:23 +0200
commit2cdc815322af6c7c22b9ceb371d9c7b2a4853c0e (patch)
tree98023777a62a533a3ac1d68ef99bcdd8bbee685e /src/kernel/syscalls.c
parenta658e1068eb2f849736931d2b99bcb6290c7ec0a (diff)
syscall/write: WRITE_TRUNCATE
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r--src/kernel/syscalls.c2
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: