compile on modern FreeBSD. After Robert Watson <rwatson@FreeBSD.org> and Alec Kloss
[arla.git] / nnpfs / bsd / nnpfs / nnpfs_vfsops-bsd.h
blob1ed40e721004e997c4d977300db6dbecf0531aec
1 /*
2 * Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * 3. Neither the name of the Institute nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
34 /* $Id$ */
36 #ifndef _nnpfs_vfsops_bsd_h
37 #define _nnpfs_vfsops_bsd_h
39 #ifdef __APPLE__
40 int
41 nnpfs_mount_context(struct mount *mp, vnode_t devvp, user_addr_t data,
42 nnpfs_vfs_context ctx);
43 int
44 nnpfs_start(struct mount *mp, int flags, nnpfs_vfs_context ctx);
46 int
47 nnpfs_unmount(struct mount *mp, int mntflags, nnpfs_vfs_context ctx);
49 int
50 nnpfs_root(struct mount *mp, struct vnode **vpp, nnpfs_vfs_context ctx);
52 int
53 nnpfs_quotactl(struct mount *mp, int cmds, uid_t uid, caddr_t arg,
54 nnpfs_vfs_context ctx);
56 /* vfs_getattr really */
57 int
58 nnpfs_statfs(struct mount *mp, nnpfs_statvfs *sbp, nnpfs_vfs_context ctx);
60 int
61 nnpfs_sync(struct mount *mp, int waitfor, nnpfs_vfs_context ctx);
63 int
64 nnpfs_dead_lookup(struct vnop_lookup_args *ap);
66 #else /* !__APPLE__*/
68 int
69 nnpfs_mount_caddr(struct mount *mp, const char *user_path, caddr_t user_data,
70 struct nameidata *ndp, d_thread_t *p);
72 int
73 nnpfs_start(struct mount * mp, int flags, d_thread_t * p);
75 int
76 nnpfs_unmount(struct mount * mp, int mntflags, d_thread_t *p);
78 int
79 nnpfs_root(struct mount *mp, struct vnode **vpp);
81 int
82 #ifdef HAVE_VFS_QUOTACTL_CADDR
83 nnpfs_quotactl(struct mount *mp, int cmd, uid_t uid, caddr_t arg, d_thread_t *p);
84 #else
85 nnpfs_quotactl(struct mount *mp, int cmd, uid_t uid, void *arg, d_thread_t *p);
86 #endif
88 int
89 nnpfs_statfs(struct mount *mp, nnpfs_statvfs *sbp, d_thread_t *p);
91 #if defined(__DragonFly__) || (defined(__FreeBSD_version) && __FreeBSD_version > 600006)
92 int
93 nnpfs_sync(struct mount *mp, int waitfor, d_thread_t *p);
94 #else
95 int
96 nnpfs_sync(struct mount *mp, int waitfor, nnpfs_kernel_cred cred, d_thread_t *p);
97 #endif
99 int
100 nnpfs_vget(struct mount * mp, ino_t ino, struct vnode ** vpp);
103 struct mbuf;
104 struct fid;
106 #ifdef HAVE_THREE_ARGUMENT_FHTOVP
108 nnpfs_fhtovp(struct mount * mp,
109 struct fid * fhp,
110 struct vnode ** vpp);
111 #else
113 nnpfs_fhtovp(struct mount * mp,
114 struct fid * fhp,
115 struct mbuf * nam,
116 struct vnode ** vpp,
117 int *exflagsp,
118 struct ucred ** credanonp);
119 #endif
121 #ifndef HAVE_VOP_VPTOFH
123 nnpfs_vptofh(struct vnode * vp,
124 struct fid * fhp
125 #if defined(__NetBSD__) && __NetBSD_Version__ >= 399002200 /* 3.99.22 */
126 ,size_t * fidsz
127 #endif
129 #endif
132 nnpfs_dead_lookup(struct vop_lookup_args *ap);
135 nnpfs_snapshot(struct mount *, struct vnode *, struct timespec *);
138 nnpfs_checkexp (struct mount *mp,
139 #if defined(__FreeBSD__) || defined(__DragonFly__)
140 struct sockaddr *nam,
141 #else
142 struct mbuf *nam,
143 #endif
144 int *exflagsp,
145 struct ucred **credanonp);
147 #endif /* !__APPLE__*/
149 #ifdef HAVE_VOP_PUTPAGES
151 nnpfs_dead_putpages(struct vop_putpages_args *ap);
152 #endif
154 #endif /* _nnpfs_vfsops_bsd_h */