Whamcloud - gitweb
Land b_head_libcfs onto HEAD (20080805_1722)
[fs/lustre-release.git] / libcfs / include / libcfs / linux / linux-fs.h
index b5201a2..1bccba0 100644 (file)
 #error Do not #include this file directly. #include <libcfs/libcfs.h> instead
 #endif
 
-#ifdef __KERNEL__
+#ifndef __KERNEL__
+#error This include is only for kernel use.
+#endif
+
 #include <linux/fs.h>
 #include <linux/stat.h>
 #include <linux/mount.h>
-#else /* !__KERNEL__ */
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/mount.h>
-#include <mntent.h>
-#endif  /* __KERNEL__ */
 
 typedef struct file cfs_file_t;
 typedef struct dentry cfs_dentry_t;
 typedef struct dirent64 cfs_dirent_t;
 
-#ifdef __KERNEL__
 #define cfs_filp_size(f)               (i_size_read((f)->f_dentry->d_inode))
 #define cfs_filp_poff(f)                (&(f)->f_pos)
 
@@ -94,5 +86,3 @@ 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);
 
 #endif
-
-#endif