From: Alan Cox Date: Sat, 16 May 2015 15:46:00 +0000 (+0100) Subject: stat: propogate EFAULT errors X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=434edfd327bcb5f0684c58bccd48b0ea2f955bba;p=FUZIX.git stat: propogate EFAULT errors --- 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