From 434edfd327bcb5f0684c58bccd48b0ea2f955bba Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 16 May 2015 16:46:00 +0100 Subject: [PATCH] stat: propogate EFAULT errors --- Kernel/syscall_fs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Kernel/syscall_fs.c b/Kernel/syscall_fs.c index 24a6265c..aef1df85 100644 --- a/Kernel/syscall_fs.c +++ b/Kernel/syscall_fs.c @@ -111,11 +111,12 @@ arg_t _sync(void) arg_t _stat(void) { inoptr ino; + int err; if (!(ino = n_open(path, NULLINOPTR))) return (-1); - stcpy(ino, buf); + err = stcpy(ino, buf); i_deref(ino); - return (0); + return err; } #undef path -- 2.34.1