Merge commit '2cedd8f0ecbd2b29bf0aac72bb8b7413b0326938' into merges
[unleashed.git] / kernel / fs / dev / sdev_vnops.h
blobf7744dae4b7cbd23ea6e70d7ca43a89533847acf
1 /*
2 * Copyright 2017 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 #ifndef _SDEV_VNOPS_H
18 #define _SDEV_VNOPS_H
20 extern int sdev_open(struct vnode **vpp, int flag, struct cred *cred,
21 caller_context_t *ct);
22 extern int sdev_close(struct vnode *vp, int flag, int count, offset_t offset,
23 struct cred *cred, caller_context_t *ct);
24 extern int sdev_read(struct vnode *vp, struct uio *uio, int ioflag,
25 struct cred *cred, struct caller_context *ct);
26 extern int sdev_write(struct vnode *vp, struct uio *uio, int ioflag,
27 struct cred *cred, struct caller_context *ct);
28 extern int sdev_ioctl(struct vnode *vp, int cmd, intptr_t arg, int flag,
29 struct cred *cred, int *rvalp, caller_context_t *ct);
30 extern int sdev_getattr(struct vnode *vp, struct vattr *vap, int flags,
31 struct cred *cr, caller_context_t *ct);
32 extern int sdev_setattr(struct vnode *vp, struct vattr *vap, int flags,
33 struct cred *cred, caller_context_t *ctp);
34 extern int sdev_getsecattr(struct vnode *vp, struct vsecattr *vsap, int flags,
35 struct cred *cr, caller_context_t *ct);
36 extern int sdev_setsecattr(struct vnode *vp, struct vsecattr *vsap, int flags,
37 struct cred *cr, caller_context_t *ct);
38 extern int sdev_access(struct vnode *vp, int mode, int flags, struct cred *cr,
39 caller_context_t *ct);
40 extern int sdev_lookup(struct vnode *dvp, char *nm, struct vnode **vpp,
41 struct pathname *pnp, int flags, struct vnode *rdir,
42 struct cred *cred, caller_context_t *ct,
43 int *direntflags, pathname_t *realpnp);
44 extern int sdev_create(struct vnode *dvp, char *nm, struct vattr *vap,
45 vcexcl_t excl, int mode, struct vnode **vpp,
46 struct cred *cred, int flag, caller_context_t *ct,
47 vsecattr_t *vsecp);
48 extern int sdev_remove(struct vnode *dvp, char *nm, struct cred *cred,
49 caller_context_t *ct, int flags);
50 extern int sdev_rename(struct vnode *odvp, char *onm, struct vnode *ndvp,
51 char *nnm, struct cred *cred, caller_context_t *ct,
52 int flags);
53 extern int sdev_symlink(struct vnode *dvp, char *lnm, struct vattr *tva,
54 char *tnm, struct cred *cred, caller_context_t *ct,
55 int flags);
56 extern int sdev_mkdir(struct vnode *dvp, char *nm, struct vattr *va,
57 struct vnode **vpp, struct cred *cred,
58 caller_context_t *ct, int flags, vsecattr_t *vsecp);
59 extern int sdev_rmdir(struct vnode *dvp, char *nm, struct vnode *cdir,
60 struct cred *cred, caller_context_t *ct, int flags);
61 extern int sdev_readlink(struct vnode *vp, struct uio *uiop, struct cred *cred,
62 caller_context_t *ct);
63 extern int sdev_readdir(struct vnode *dvp, struct uio *uiop, struct cred *cred,
64 int *eofp, caller_context_t *ct, int flags);
65 extern void sdev_inactive(struct vnode *vp, struct cred *cred,
66 caller_context_t *ct);
67 extern int sdev_fid(struct vnode *vp, struct fid *fidp, caller_context_t *ct);
68 extern int sdev_rwlock(struct vnode *vp, int write_flag, caller_context_t *ctp);
69 extern void sdev_rwunlock(struct vnode *vp, int write_flag,
70 caller_context_t *ctp);
71 extern int sdev_seek(struct vnode *vp, offset_t ooff, offset_t *noffp,
72 caller_context_t *ct);
73 extern int sdev_frlock(struct vnode *vp, int cmd, struct flock64 *bfp, int flag,
74 offset_t offset, struct flk_callback *flk_cbp,
75 struct cred *cr, caller_context_t *ct);
76 extern int sdev_pathconf(vnode_t *vp, int cmd, ulong_t *valp, cred_t *cr,
77 caller_context_t *ct);
79 #endif