syscall: introduce level 0
authorAlan Cox <alan@linux.intel.com>
Fri, 23 Jun 2017 17:05:56 +0000 (18:05 +0100)
committerAlan Cox <alan@linux.intel.com>
Fri, 23 Jun 2017 17:05:56 +0000 (18:05 +0100)
Kernel/syscall_fs3.c
Kernel/syscall_other.c

index 17725a6..83e0474 100644 (file)
@@ -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
 }
 
 
index 9283793..9f31652 100644 (file)
@@ -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
 }