UPAGES 8; dumpstack 96; msgbufmap; kernacc rounding bug fixed
[unix-history] / usr / src / sys / kern / vfs_lookup.c
index 7cb0879..8091f99 100644 (file)
@@ -1,4 +1,4 @@
-/*     vfs_lookup.c    3.4     %G%     */
+/*     vfs_lookup.c    4.3     %G%     */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -7,6 +7,7 @@
 #include "../h/dir.h"
 #include "../h/user.h"
 #include "../h/buf.h"
 #include "../h/dir.h"
 #include "../h/user.h"
 #include "../h/buf.h"
+#include "../h/conf.h"
 
 /*
  * Convert a pathname into a pointer to
 
 /*
  * Convert a pathname into a pointer to
@@ -58,6 +59,13 @@ cloop:
        if(c == '\0')
                return(dp);
 
        if(c == '\0')
                return(dp);
 
+#ifdef CHAOS
+       if((dp->i_mode&IFMT) == IFCHR && cdevpath & (1 << major(dp->i_un.i_rdev)) ) {
+               u.u_dirp--;
+               return(dp);
+       }
+#endif
+
        /*
         * If there is another component,
         * Gather up name into
        /*
         * If there is another component,
         * Gather up name into
@@ -68,6 +76,10 @@ cloop:
        while (c != '/' && c != '\0' && u.u_error == 0 ) {
                if (mpxip!=NULL && c=='!')
                        break;
        while (c != '/' && c != '\0' && u.u_error == 0 ) {
                if (mpxip!=NULL && c=='!')
                        break;
+               if (flag==1 && c == ('/'|0200)) {
+                       u.u_error = ENOENT;
+                       goto out;
+               }
                if (cp < &u.u_dbuf[DIRSIZ])
                        *cp++ = c;
                c = (*func)();
                if (cp < &u.u_dbuf[DIRSIZ])
                        *cp++ = c;
                c = (*func)();