From 449824349bd9c8543d860202ce11881a27ca38c7 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 25 Jul 2016 07:50:34 +0200 Subject: [PATCH] if libc_sd is invalid, the system call open returns an error number --- hermit/kernel/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hermit/kernel/syscall.c b/hermit/kernel/syscall.c index b7c64d808..f3d74181d 100644 --- a/hermit/kernel/syscall.c +++ b/hermit/kernel/syscall.c @@ -263,7 +263,7 @@ int sys_open(const char* name, int flags, int mode) spinlock_lock(&lwip_lock); if (libc_sd < 0) { - ret = 0; + ret = -EINVAL; goto out; }