move IFMT => VTYPE and VTYPE => IFMT to vnode since stat requires it
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 6 Feb 1992 15:16:58 +0000 (07:16 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 6 Feb 1992 15:16:58 +0000 (07:16 -0800)
SCCS-vsn: sys/kern/vfs_subr.c 7.68

usr/src/sys/kern/vfs_subr.c

index 799cc0c..383aae3 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)vfs_subr.c  7.67.1.1 (Berkeley) %G%
+ *     @(#)vfs_subr.c  7.68 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -16,6 +16,7 @@
 #include <sys/mount.h>
 #include <sys/time.h>
 #include <sys/vnode.h>
 #include <sys/mount.h>
 #include <sys/time.h>
 #include <sys/vnode.h>
+#include <sys/stat.h>
 #include <sys/specdev.h>
 #include <sys/namei.h>
 #include <sys/ucred.h>
 #include <sys/specdev.h>
 #include <sys/namei.h>
 #include <sys/ucred.h>
 #include <sys/errno.h>
 #include <sys/malloc.h>
 
 #include <sys/errno.h>
 #include <sys/malloc.h>
 
+enum vtype iftovt_tab[16] = {
+       VNON, VFIFO, VCHR, VNON, VDIR, VNON, VBLK, VNON,
+       VREG, VNON, VLNK, VNON, VSOCK, VNON, VNON, VBAD,
+};
+int    vttoif_tab[9] = {
+       0, S_IFREG, S_IFDIR, S_IFBLK, S_IFCHR, S_IFLNK,
+       S_IFSOCK, S_IFIFO, S_IFMT,
+};
+
 /*
  * Remove a mount point from the list of mounted filesystems.
  * Unmount of the root is illegal.
 /*
  * Remove a mount point from the list of mounted filesystems.
  * Unmount of the root is illegal.