From 1e786f6ea866b1b2e559b3964f6c479ffa3c1d31 Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Fri, 23 Nov 2018 17:21:10 +0900 Subject: [PATCH] kernel: stat should throw ENOENT --- kernel/sys/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sys/syscall.c b/kernel/sys/syscall.c index 472579f1..83a49ed2 100644 --- a/kernel/sys/syscall.c +++ b/kernel/sys/syscall.c @@ -332,7 +332,7 @@ static int stat_node(fs_node_t * fn, uintptr_t st) { if (!fn) { memset(f, 0x00, sizeof(struct stat)); debug_print(INFO, "stat: This file doesn't exist"); - return -1; + return -ENOENT; } f->st_dev = (uint16_t)(((uint32_t)fn->device & 0xFFFF0) >> 8); f->st_ino = fn->inode;