SCCS-vsn: sys/kern/vfs_lookup.c 4.17
SCCS-vsn: sys/ufs/ffs/ufs_lookup.c 4.17
SCCS-vsn: sys/ufs/ufs/ufs_lookup.c 4.17
-/* vfs_lookup.c 4.16 82/06/07 */
+/* vfs_lookup.c 4.17 82/07/15 */
/* merged into kernel: @(#)nami.c 2.3 4/8/82 */
/* merged into kernel: @(#)nami.c 2.3 4/8/82 */
#include "../h/buf.h"
#include "../h/conf.h"
#include "../h/buf.h"
#include "../h/conf.h"
+#ifdef EFS
+extern int efs_major;
+#endif
+
/*
* Convert a pathname into a pointer to
* a locked inode.
/*
* Convert a pathname into a pointer to
* a locked inode.
* must have X permission.
* cp is a path name relative to that directory.
*/
* must have X permission.
* cp is a path name relative to that directory.
*/
+#ifdef EFS
+ /*
+ * But first, if the last component was a character special file
+ * and the major device is the extended file system device
+ * then return even if more pathname exists.
+ */
+ if ((dp->i_mode & IFMT) == IFCHR && major(dp->i_rdev) == efs_major) {
+ brelse(nbp);
+ return(dp);
+ }
+#endif
if ((dp->i_mode&IFMT) != IFDIR)
u.u_error = ENOTDIR;
(void) access(dp, IEXEC);
if ((dp->i_mode&IFMT) != IFDIR)
u.u_error = ENOTDIR;
(void) access(dp, IEXEC);
-/* ufs_lookup.c 4.16 82/06/07 */
+/* ufs_lookup.c 4.17 82/07/15 */
/* merged into kernel: @(#)nami.c 2.3 4/8/82 */
/* merged into kernel: @(#)nami.c 2.3 4/8/82 */
#include "../h/buf.h"
#include "../h/conf.h"
#include "../h/buf.h"
#include "../h/conf.h"
+#ifdef EFS
+extern int efs_major;
+#endif
+
/*
* Convert a pathname into a pointer to
* a locked inode.
/*
* Convert a pathname into a pointer to
* a locked inode.
* must have X permission.
* cp is a path name relative to that directory.
*/
* must have X permission.
* cp is a path name relative to that directory.
*/
+#ifdef EFS
+ /*
+ * But first, if the last component was a character special file
+ * and the major device is the extended file system device
+ * then return even if more pathname exists.
+ */
+ if ((dp->i_mode & IFMT) == IFCHR && major(dp->i_rdev) == efs_major) {
+ brelse(nbp);
+ return(dp);
+ }
+#endif
if ((dp->i_mode&IFMT) != IFDIR)
u.u_error = ENOTDIR;
(void) access(dp, IEXEC);
if ((dp->i_mode&IFMT) != IFDIR)
u.u_error = ENOTDIR;
(void) access(dp, IEXEC);
-/* ufs_lookup.c 4.16 82/06/07 */
+/* ufs_lookup.c 4.17 82/07/15 */
/* merged into kernel: @(#)nami.c 2.3 4/8/82 */
/* merged into kernel: @(#)nami.c 2.3 4/8/82 */
#include "../h/buf.h"
#include "../h/conf.h"
#include "../h/buf.h"
#include "../h/conf.h"
+#ifdef EFS
+extern int efs_major;
+#endif
+
/*
* Convert a pathname into a pointer to
* a locked inode.
/*
* Convert a pathname into a pointer to
* a locked inode.
* must have X permission.
* cp is a path name relative to that directory.
*/
* must have X permission.
* cp is a path name relative to that directory.
*/
+#ifdef EFS
+ /*
+ * But first, if the last component was a character special file
+ * and the major device is the extended file system device
+ * then return even if more pathname exists.
+ */
+ if ((dp->i_mode & IFMT) == IFCHR && major(dp->i_rdev) == efs_major) {
+ brelse(nbp);
+ return(dp);
+ }
+#endif
if ((dp->i_mode&IFMT) != IFDIR)
u.u_error = ENOTDIR;
(void) access(dp, IEXEC);
if ((dp->i_mode&IFMT) != IFDIR)
u.u_error = ENOTDIR;
(void) access(dp, IEXEC);