1 | /* $Id: vboxvfs_vnops.c 10067 2008-07-01 11:07:51Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VirtualBox File System Driver for Solaris Guests, VNode Operations.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2008 Sun Microsystems, Inc.
|
---|
8 | *
|
---|
9 | * Sun Microsystems, Inc. confidential
|
---|
10 | * All rights reserved
|
---|
11 | */
|
---|
12 |
|
---|
13 | #include <sys/param.h>
|
---|
14 | #include <sys/systm.h>
|
---|
15 | #include <sys/errno.h>
|
---|
16 | #include <sys/uio.h>
|
---|
17 | #include <sys/cred.h>
|
---|
18 | #include <sys/vnode.h>
|
---|
19 | #include "vboxvfs.h"
|
---|
20 |
|
---|
21 | static int VBoxVFS_Open(vnode_t **vpp, int flag, struct cred *cr, caller_context_t *ct)
|
---|
22 | {
|
---|
23 | }
|
---|
24 |
|
---|
25 | static int VBoxVFS_Close(vnode_t *vp, int flag, int count, offset_t offset, struct cred *cr, caller_context_t *ct)
|
---|
26 | {
|
---|
27 | }
|
---|
28 |
|
---|
29 | static int VBoxVFS_Read(vnode_t *vp, struct uio *uiop, int ioflag, struct cred *cr, caller_context_t *ct)
|
---|
30 | {
|
---|
31 | }
|
---|
32 |
|
---|
33 | static int VBoxVFS_Write(vnode_t *vp, struct uio *uiop, int ioflag, struct cred *cr, caller_context_t *ct)
|
---|
34 | {
|
---|
35 | }
|
---|
36 |
|
---|
37 | static int VBoxVFS_IOCtl(vnode_t *vp, int cmd, intptr_t arg, int flag, struct cred *cr, int *rvalp, caller_context_t *ct)
|
---|
38 | {
|
---|
39 | }
|
---|
40 |
|
---|
41 | static int VBoxVFS_Setfl(vnode_t *vp, int oflags, int nflags, cred_t *cr, caller_context_t *ct)
|
---|
42 | {
|
---|
43 | }
|
---|
44 |
|
---|
45 | static int VBoxVFS_Getattr(vnode_t *vp, struct vattr *vap, int flags, struct cred *cr, caller_context_t *ct)
|
---|
46 | {
|
---|
47 | }
|
---|
48 |
|
---|
49 | static int VBoxVFS_Setattr(vnode_t *vp, struct vattr *vap, int flags, struct cred *cr, caller_context_t *ct)
|
---|
50 | {
|
---|
51 | }
|
---|
52 |
|
---|
53 | static int VBoxVFS_Access(vnode_t *vp, int mode, int flags, struct cred *cr, caller_context_t *ct)
|
---|
54 | {
|
---|
55 | }
|
---|
56 |
|
---|
57 | static int VBoxVFS_Fsync(vnode_t *vp, int syncflag, struct cred *cr, caller_context_t *ct)
|
---|
58 | {
|
---|
59 | }
|
---|
60 |
|
---|
61 | static void VBoxVFS_Inactive(vnode_t *vp, struct cred *cr, caller_context_t *ct)
|
---|
62 | {
|
---|
63 | }
|
---|
64 |
|
---|
65 | static int VBoxVFS_Fid(vnode_t *vp, struct fid *fidp, caller_context_t *ct)
|
---|
66 | {
|
---|
67 | }
|
---|
68 |
|
---|
69 | static int VBoxVFS_Lookup(vnode_t *dvp, char *nm, vnode_t **vpp, struct pathname *pnp, int flags, vnode_t *rdir,
|
---|
70 | struct cred *cr, caller_context_t *ct, int *direntflags, pathname_t *realpnp)
|
---|
71 | {
|
---|
72 | }
|
---|
73 |
|
---|
74 | static int VBoxVFS_Create(vnode_t *dvp, char *nm, struct vattr *va, enum vcexcl exclusive, int mode, vnode_t **vpp,
|
---|
75 | struct cred *cr, int flag, caller_context_t *ct, vsecattr_t *vsecp)
|
---|
76 | {
|
---|
77 | }
|
---|
78 |
|
---|
79 | static int VBoxVFS_Remove(vnode_t *dvp, char *nm, struct cred *cr, caller_context_t *ct, int flags)
|
---|
80 | {
|
---|
81 | }
|
---|
82 |
|
---|
83 | static int VBoxVFS_Link(vnode_t *tdvp, vnode_t *vp, char *tnm, struct cred *cr, caller_context_t *ct, int flags)
|
---|
84 | {
|
---|
85 | }
|
---|
86 |
|
---|
87 | static int VBoxVFS_Rename(vnode_t *odvp, char *onm, vnode_t *ndvp, char *nnm, struct cred *cr, caller_context_t *ct, int flags)
|
---|
88 | {
|
---|
89 | }
|
---|
90 |
|
---|
91 | static int VBoxVFS_Mkdir(vnode_t *dvp, char *nm, struct vattr *va, vnode_t **vpp, struct cred *cr, caller_context_t *ct,
|
---|
92 | int flags, vsecattr_t *vsecp)
|
---|
93 | {
|
---|
94 | }
|
---|
95 |
|
---|
96 | static int VBoxVFS_Realvp(vnode_t *vp, vnode_t **vpp, caller_context_t *ct)
|
---|
97 | {
|
---|
98 | }
|
---|
99 |
|
---|
100 | static int VBoxVFS_Rmdir(vnode_t *dvp, char *nm, vnode_t *cdir, struct cred *cr, caller_context_t *ct, int flags)
|
---|
101 | {
|
---|
102 | }
|
---|
103 |
|
---|
104 | static int VBoxVFS_Symlink(vnode_t *dvp, char *lnm, struct vattr *tva, char *tnm, struct cred *cr,
|
---|
105 | caller_context_t *ct, int flags)
|
---|
106 | {
|
---|
107 | }
|
---|
108 |
|
---|
109 | static int VBoxVFS_Readlink(vnode_t *vp, struct uio *uiop, struct cred *cr, caller_context_t *ct)
|
---|
110 | {
|
---|
111 | }
|
---|
112 |
|
---|
113 | static int VBoxVFS_Readdir(vnode_t *vp, struct uio *uiop, struct cred *cr, int *eofp, caller_context_t *ct, int flags)
|
---|
114 | {
|
---|
115 | }
|
---|
116 |
|
---|
117 | static int VBoxVFS_Rwlock(vnode_t *vp, int write_lock, caller_context_t *ct)
|
---|
118 | {
|
---|
119 | }
|
---|
120 |
|
---|
121 | static void VBoxVFS_Rwunlock(vnode_t *vp, int write_lock, caller_context_t *ct)
|
---|
122 | {
|
---|
123 | }
|
---|
124 |
|
---|
125 | static int VBoxVFS_Seek(vnode_t *vp, offset_t ooff, offset_t *noffp, caller_context_t *ct)
|
---|
126 | {
|
---|
127 | }
|
---|
128 |
|
---|
129 | static int VBoxVFS_Cmp(vnode_t *vp1, vnode_t *vp2, caller_context_t *ct)
|
---|
130 | {
|
---|
131 | }
|
---|
132 |
|
---|
133 | static int VBoxVFS_Frlock(vnode_t *vp, int cmd, struct flock64 *bfp, int flag, offset_t offset, struct flk_callback *flk_cbp,
|
---|
134 | cred_t *cr, caller_context_t *ct)
|
---|
135 | {
|
---|
136 | }
|
---|
137 |
|
---|
138 | static int VBoxVFS_Space(vnode_t *vp, int cmd, struct flock64 *bfp, int flag, offset_t offset, struct cred *cr,
|
---|
139 | caller_context_t *ct)
|
---|
140 | {
|
---|
141 | }
|
---|
142 |
|
---|
143 | static int VBoxVFS_Getpage(vnode_t *vp, offset_t off, size_t len, uint_t *prot, struct page *parr[], size_t psz,
|
---|
144 | struct seg *seg, caddr_t addr, enum seg_rw rw, struct cred *cr, caller_context_t *ct)
|
---|
145 | {
|
---|
146 | }
|
---|
147 |
|
---|
148 | static int VBoxVFS_Putpage(vnode_t *vp, offset_t off, size_t len, int flags, struct cred *cr, caller_context_t *ct)
|
---|
149 | {
|
---|
150 | }
|
---|
151 |
|
---|
152 | static int VBoxVFS_Map(vnode_t *vp, offset_t off, struct as *as, caddr_t *addrp, size_t len, uchar_t prot,
|
---|
153 | uchar_t maxprot, uint_t flags, struct cred *cr, caller_context_t *ct)
|
---|
154 | {
|
---|
155 | }
|
---|
156 |
|
---|
157 | static int VBoxVFS_Addmap(vnode_t *vp, offset_t off, struct as *as, caddr_t addr, size_t len, uchar_t prot,
|
---|
158 | uchar_t maxprot, uint_t flags, struct cred *cr, caller_context_t *ct)
|
---|
159 | {
|
---|
160 | }
|
---|
161 |
|
---|
162 | static int VBoxVFS_Delmap(vnode_t *vp, offset_t off, struct as *as, caddr_t addr, size_t len, uint_t prot, uint_t maxprot,
|
---|
163 | uint_t flags, struct cred *cr, caller_context_t *ct)
|
---|
164 | {
|
---|
165 | }
|
---|
166 |
|
---|
167 | static int VBoxVFS_Pathconf(vnode_t *vp, int cmd, ulong_t *valp, struct cred *cr, caller_context_t *ct)
|
---|
168 | {
|
---|
169 | }
|
---|
170 |
|
---|
171 | static int VBoxVFS_Shrlock(vnode_t *vp, int cmd, struct shrlock *shr, int flag, cred_t *cr, caller_context_t *ct)
|
---|
172 | {
|
---|
173 | }
|
---|
174 |
|
---|
175 | /**
|
---|
176 | * VBoxVFS: vnode operations vector.
|
---|
177 | */
|
---|
178 | struct vnodeops *g_pVBoxVFS_vnodeops;
|
---|
179 |
|
---|
180 | const fs_operation_def_t g_VBoxVFS_vnodeops_template[] =
|
---|
181 | {
|
---|
182 | VOPNAME_OPEN, { .vop_open = VBoxVFS_Open },
|
---|
183 | VOPNAME_CLOSE, { .vop_close = VBoxVFS_Close },
|
---|
184 | VOPNAME_READ, { .vop_read = VBoxVFS_Read },
|
---|
185 | VOPNAME_WRITE, { .vop_write = VBoxVFS_Write },
|
---|
186 | VOPNAME_IOCTL, { .vop_ioctl = VBoxVFS_IOCtl },
|
---|
187 | VOPNAME_SETFL, { .vop_setfl = VBoxVFS_Setfl },
|
---|
188 | VOPNAME_GETATTR, { .vop_getattr = VBoxVFS_Getattr },
|
---|
189 | VOPNAME_SETATTR, { .vop_setattr = VBoxVFS_Setattr },
|
---|
190 | VOPNAME_ACCESS, { .vop_access = VBoxVFS_Access },
|
---|
191 | VOPNAME_LOOKUP, { .vop_lookup = VBoxVFS_Lookup },
|
---|
192 | VOPNAME_CREATE, { .vop_create = VBoxVFS_Create },
|
---|
193 | VOPNAME_REMOVE, { .vop_remove = VBoxVFS_Remove },
|
---|
194 | VOPNAME_LINK, { .vop_link = VBoxVFS_Link },
|
---|
195 | VOPNAME_RENAME, { .vop_rename = VBoxVFS_Rename },
|
---|
196 | VOPNAME_MKDIR, { .vop_mkdir = VBoxVFS_Mkdir },
|
---|
197 | VOPNAME_RMDIR, { .vop_rmdir = VBoxVFS_Rmdir },
|
---|
198 | VOPNAME_READDIR, { .vop_readdir = VBoxVFS_Readdir },
|
---|
199 | VOPNAME_SYMLINK, { .vop_symlink = VBoxVFS_Symlink },
|
---|
200 | VOPNAME_READLINK, { .vop_readlink = VBoxVFS_Readlink },
|
---|
201 | VOPNAME_FSYNC, { .vop_fsync = VBoxVFS_Fsync },
|
---|
202 | VOPNAME_INACTIVE, { .vop_inactive = VBoxVFS_Inactive },
|
---|
203 | VOPNAME_FID, { .vop_fid = VBoxVFS_Fid },
|
---|
204 | VOPNAME_RWLOCK, { .vop_rwlock = VBoxVFS_Rwlock },
|
---|
205 | VOPNAME_RWUNLOCK, { .vop_rwunlock = VBoxVFS_Rwunlock },
|
---|
206 | VOPNAME_SEEK, { .vop_seek = VBoxVFS_Seek },
|
---|
207 | VOPNAME_CMP, { .vop_cmp = VBoxVFS_Cmp },
|
---|
208 | VOPNAME_FRLOCK, { .vop_frlock = VBoxVFS_Frlock },
|
---|
209 | VOPNAME_SPACE, { .vop_space = VBoxVFS_Space },
|
---|
210 | VOPNAME_REALVP, { .vop_realvp = VBoxVFS_Realvp },
|
---|
211 | VOPNAME_GETPAGE, { .vop_getpage = VBoxVFS_Getpage },
|
---|
212 | VOPNAME_PUTPAGE, { .vop_putpage = VBoxVFS_Putpage },
|
---|
213 | VOPNAME_MAP, { .vop_map = VBoxVFS_Map },
|
---|
214 | VOPNAME_ADDMAP, { .vop_addmap = VBoxVFS_Addmap },
|
---|
215 | VOPNAME_DELMAP, { .vop_delmap = VBoxVFS_Delmap },
|
---|
216 | VOPNAME_PATHCONF, { .vop_pathconf = VBoxVFS_Pathconf },
|
---|
217 | VOPNAME_SHRLOCK, { .vop_shrlock = VBoxVFS_Shrlock },
|
---|
218 | NULL, NULL
|
---|
219 | };
|
---|
220 |
|
---|