UKERNEL: Use real vnode type constants
authorAndrew Deason <adeason@sinenomine.net>
Thu, 8 Apr 2010 17:15:34 +0000 (12:15 -0500)
committerDerrick Brashear <shadow@dementia.org>
Fri, 9 Apr 2010 18:51:35 +0000 (11:51 -0700)
In UKERNEL, make VDIR be S_IFDIR, VREG be S_IFREG, etc. This makes
fakestat work correctly, since the va_mode of faked mountpoints are
OR'd with VDIR.

Change-Id: I7ac1dc7ae1d7cefade9bf92d8169db80977a5c76
Reviewed-on: http://gerrit.openafs.org/1718
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/afs/UKERNEL/sysincludes.h

index ff768a7..dca066e 100644 (file)
@@ -341,26 +341,18 @@ typedef long usr_ino_t;
 #ifdef VFIFO
 #undef VFIFO
 #endif
-#ifdef VDOOR
-#undef VDOOR
-#endif
-#ifdef VBAD
-#undef VBAD
-#endif
 #ifdef VSOCK
 #undef VSOCK
 #endif
 
-#define VNON                   0
-#define VREG                   1
-#define VDIR                   2
-#define VBLK                   3
-#define VCHR                   4
-#define VLNK                   5
-#define VFIFO                  6
-#define VDOOR                  7
-#define VBAD                   8
-#define VSOCK                  9
+#define VNON 0
+#define VREG S_IFREG
+#define VDIR S_IFDIR
+#define VBLK S_IFBLK
+#define VCHR S_IFCHR
+#define VLNK S_IFLNK
+#define VSOCK S_IFSOCK
+#define VFIFO S_IFIFO
 
 typedef int usr_vtype_t;