From: Alan Cox Date: Fri, 23 Jun 2017 17:05:56 +0000 (+0100) Subject: syscall: introduce level 0 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=847ca4775b7057ef4affeda0fbbe0de597f89764;p=FUZIX.git syscall: introduce level 0 --- diff --git a/Kernel/syscall_fs3.c b/Kernel/syscall_fs3.c index 17725a67..83e04749 100644 --- a/Kernel/syscall_fs3.c +++ b/Kernel/syscall_fs3.c @@ -324,6 +324,7 @@ Perform locking upon a file. arg_t _flock(void) { +#ifndef CONFIG_LEVEL_0 inoptr ino; struct oft *o; staticfast uint8_t c; @@ -396,6 +397,10 @@ done: o->o_access |= O_FLOCK; wakeup(&ino->c_flags); return 0; +#else + udata.u_error = ENOSYS; + return -1; +#endif } diff --git a/Kernel/syscall_other.c b/Kernel/syscall_other.c index 92837930..9f31652c 100644 --- a/Kernel/syscall_other.c +++ b/Kernel/syscall_other.c @@ -26,6 +26,7 @@ put inside itself! arg_t _rename(void) { +#ifndef CONFIG_LEVEL_0 staticfast inoptr srci, srcp, dsti, dstp; char fname[FILENAME_LEN + 1]; arg_t ret; @@ -115,6 +116,10 @@ arg_t _rename(void) if (dsti) i_deref(dsti); goto nogood2; +#else + udata.u_error = -ENOSYS; + return -1; +#endif } #undef src @@ -131,6 +136,7 @@ arg_t _rename(void) arg_t _mkdir(void) { +#ifndef CONFIG_LEVEL_0 inoptr ino; inoptr parent; char fname[FILENAME_LEN + 1]; @@ -185,7 +191,10 @@ arg_t _mkdir(void) nogood2: i_deref(parent); return (-1); - +#else + udata.u_error = -ENOSYS; + return -1; +#endif } #undef name @@ -199,6 +208,7 @@ char *path; arg_t _rmdir(void) { +#ifndef CONFIG_LEVEL_0 inoptr ino; inoptr parent; char fname[FILENAME_LEN + 1]; @@ -255,6 +265,11 @@ arg_t _rmdir(void) i_deref(parent); i_deref(ino); return (-1); +#else + udata.u_error = -ENOSYS; + return -1; +#endif + } #undef path @@ -428,6 +443,7 @@ arg_t _profil(void) p->p_profoff = offset; return 0; #else + udata.u_error = ENOSYS; return -1; #endif }