#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)
ssize_t cfs_user_write (cfs_file_t *filp, const char *buf, size_t count, loff_t *offset);
#endif
-
-#endif