summaryrefslogtreecommitdiffstats
path: root/sys/sys/file.h
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2008-05-26 15:12:47 +0000
committerpjd <pjd@FreeBSD.org>2008-05-26 15:12:47 +0000
commit268a4c430f25bc479b5e1e097f51394aa0f1fffb (patch)
tree810430b0f4505cb90cb6ec29b3bdeb51bbe78cd9 /sys/sys/file.h
parent0fcadc05fc9a0d6d85365da88c23c83223ea164c (diff)
downloadFreeBSD-src-268a4c430f25bc479b5e1e097f51394aa0f1fffb.zip
FreeBSD-src-268a4c430f25bc479b5e1e097f51394aa0f1fffb.tar.gz
Use _WANT_FILE to make struct file visible from userland. This is
similar to _WANT_UCRED and _WANT_PRISON and seems to be much nicer than defining _KERNEL. It is also needed for my sys/refcount.h change going in soon.
Diffstat (limited to 'sys/sys/file.h')
-rw-r--r--sys/sys/file.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/sys/file.h b/sys/sys/file.h
index 3b05440..b2a6820 100644
--- a/sys/sys/file.h
+++ b/sys/sys/file.h
@@ -97,7 +97,9 @@ struct fileops {
#define DFLAG_PASSABLE 0x01 /* may be passed via unix sockets. */
#define DFLAG_SEEKABLE 0x02 /* seekable / nonsequential */
+#endif /* _KERNEL */
+#if defined(_KERNEL) || defined(_WANT_FILE)
/*
* Kernel descriptor table.
* One entry for each open kernel vnode and socket.
@@ -137,7 +139,7 @@ struct file {
#define FOFFSET_LOCKED 0x1
#define FOFFSET_LOCK_WAITING 0x2
-#endif /* _KERNEL */
+#endif /* _KERNEL || _WANT_FILE */
/*
* Userland version of struct file, for sysctl
OpenPOWER on IntegriCloud