Whamcloud - gitweb
b=17670
[fs/lustre-release.git] / libcfs / include / libcfs / linux / linux-fs.h
index 903001e..dc9ab89 100644 (file)
@@ -85,6 +85,9 @@ typedef struct file_lock cfs_flock_t;
 
 ssize_t cfs_user_write (cfs_file_t *filp, const char *buf, size_t count, loff_t *offset);
 
-#define CFS_IFTODT(type)   (((type) & 0170000) >> 12)
+#define CFS_IFSHIFT 12
+
+#define CFS_IFTODT(type)           (((type) & S_IFMT) >> CFS_IFSHIFT)
+#define CFS_DTTOIF(dirtype)        ((dirtype) << CFS_IFSHIFT)
 
 #endif