summaryrefslogtreecommitdiff
path: root/src/kernel
diff options
context:
space:
mode:
authordzwdz2024-02-23 21:23:40 +0100
committerdzwdz2024-02-23 21:23:40 +0100
commitdf889665b915d432e0205fad9cd8ccba609661c1 (patch)
treef7b34b188839455bccfcbf27426a02ece29f36c2 /src/kernel
parenta0413d85fa8f8336678d3a66807d69b4556afbf6 (diff)
kernel: fix _sys_fs_wait in init
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/syscalls.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c
index 343f45c..de53062 100644
--- a/src/kernel/syscalls.c
+++ b/src/kernel/syscalls.c
@@ -256,9 +256,7 @@ long _sys_close(hid_t hid) {
hid_t _sys_fs_wait(char __user *buf, long max_len, struct ufs_request __user *res) {
VfsBackend *backend = proc_cur->controlled;
- // TODO can be used to tell if you're init
- if (!backend) SYSCALL_RETURN(-1);
- if (backend->usehcnt == 0) {
+ if (!backend || backend->usehcnt == 0) {
/* nothing on the other end. EPIPE seems fitting */
SYSCALL_RETURN(-EPIPE);
}