PageRenderTime 28ms CodeModel.GetById 2ms app.highlight 21ms RepoModel.GetById 1ms app.codeStats 0ms

/core/10.4/fusefs/fuse_vnops.h

http://macfuse.googlecode.com/
C++ Header | 232 lines | 135 code | 75 blank | 22 comment | 0 complexity | 5da0f2e6f14563c75fd281bc925e00f6 MD5 | raw file
  1/*
  2 * Copyright (C) 2006 Google. All Rights Reserved.
  3 * Amit Singh <singh@>
  4 */
  5
  6#ifndef _FUSE_VNOPS_H_
  7#define _FUSE_VNOPS_H_
  8
  9#include <fuse_param.h>
 10
 11typedef int (*fuse_vnode_op_t)(void *);
 12
 13#if M_MACFUSE_ENABLE_FIFOFS
 14typedef int (*fuse_fifo_op_t)(void *);
 15#endif
 16
 17#if M_MACFUSE_ENABLE_SPECFS
 18typedef int (*fuse_spec_op_t)(void *);
 19#endif
 20
 21/*
 22 * VNOPs
 23 */
 24
 25static int fuse_vnop_access(struct vnop_access_args *ap);
 26
 27// static int fuse_vnop_advlock(struct vnop_advlock_args *ap);
 28
 29// static int fuse_vnop_allocate(struct vnop_allocate_args *ap);
 30
 31static int fuse_vnop_blktooff(struct vnop_blktooff_args *ap);
 32
 33static int fuse_vnop_blockmap(struct vnop_blockmap_args *ap);
 34
 35// static int fuse_vnop_bwrite(struct vnop_bwrite_args *ap);
 36
 37static int fuse_vnop_close(struct vnop_close_args *ap);
 38
 39// static int fuse_vnop_copyfile(struct vnop_copyfile_args *ap);
 40
 41static int fuse_vnop_create(struct vnop_create_args *ap);
 42
 43static int fuse_vnop_exchange(struct vnop_exchange_args *ap);
 44
 45static int fuse_vnop_fsync(struct vnop_fsync_args *ap);
 46
 47static int fuse_vnop_getattr(struct vnop_getattr_args *ap);
 48
 49// static int fuse_vnop_getattrlist(struct vnop_getattrlist_args *ap);
 50
 51// static int fuse_vnop_getnamedstream(struct vnop_getnamedstream_args *ap);
 52
 53#if M_MACFUSE_ENABLE_XATTR
 54static int fuse_vnop_getxattr(struct vnop_getxattr_args *ap);
 55#endif
 56
 57static int fuse_vnop_inactive(struct vnop_inactive_args *ap);
 58
 59static int fuse_vnop_ioctl(struct vnop_ioctl_args *ap);
 60
 61#if M_MACFUSE_ENABLE_KQUEUE
 62static int fuse_vnop_kqfilt_add(struct vnop_kqfilt_add_args *ap);
 63
 64static int fuse_vnop_kqfilt_remove(struct vnop_kqfilt_remove_args *ap);
 65#endif
 66
 67static int fuse_vnop_link(struct vnop_link_args *ap);
 68
 69#if M_MACFUSE_ENABLE_XATTR
 70static int fuse_vnop_listxattr(struct vnop_listxattr_args *ap);
 71#endif
 72
 73static int fuse_vnop_lookup(struct vnop_lookup_args *ap);
 74
 75// static int fuse_vnop_makenamedstream(struct fuse_makenamedstream_args *ap);
 76
 77static int fuse_vnop_mkdir(struct vnop_mkdir_args *ap);
 78
 79static int fuse_vnop_mknod(struct vnop_mknod_args *ap);
 80
 81static int fuse_vnop_mmap(struct vnop_mmap_args *ap);
 82
 83static int fuse_vnop_mnomap(struct vnop_mnomap_args *ap);
 84
 85static int fuse_vnop_offtoblk(struct vnop_offtoblk_args *ap);
 86
 87static int fuse_vnop_open(struct vnop_open_args *ap);
 88
 89static int fuse_vnop_pagein(struct vnop_pagein_args *ap);
 90
 91static int fuse_vnop_pageout(struct vnop_pageout_args *ap);
 92
 93static int fuse_vnop_pathconf(struct vnop_pathconf_args *ap);
 94
 95static int fuse_vnop_read(struct vnop_read_args *ap);
 96
 97static int fuse_vnop_readdir(struct vnop_readdir_args *ap);
 98
 99// static int fuse_vnop_readdirattr(struct vnop_readdirattr_args *ap);
100
101static int fuse_vnop_readlink(struct vnop_readlink_args *ap);
102
103static int fuse_vnop_reclaim(struct vnop_reclaim_args *ap);
104
105static int fuse_vnop_remove(struct vnop_remove_args *ap);
106
107// static int fuse_vnop_readnamedstream(struct vnop_readnamedstream_args *ap);
108
109#if M_MACFUSE_ENABLE_XATTR
110static int fuse_vnop_removexattr(struct vnop_removexattr_args *ap);
111#endif
112
113static int fuse_vnop_rename(struct vnop_rename_args *ap);
114
115static int fuse_vnop_revoke(struct vnop_revoke_args *ap);
116
117static int fuse_vnop_rmdir(struct vnop_rmdir_args *ap);
118
119// static int fuse_vnop_searchfs(struct vnop_searchfs_args *ap);
120
121static int fuse_vnop_select(struct vnop_select_args *ap);
122
123static int fuse_vnop_setattr(struct vnop_setattr_args *ap);
124
125// static int fuse_vnop_setlabel(struct vnop_setlabel_args *ap);
126
127// static int fuse_vnop_setattrlist (struct vnop_setattrlist_args *ap);
128
129#if M_MACFUSE_ENABLE_XATTR
130static int fuse_vnop_setxattr(struct vnop_setxattr_args *ap);
131#endif
132
133static int fuse_vnop_strategy(struct vnop_strategy_args *ap);
134
135static int fuse_vnop_symlink(struct vnop_symlink_args *ap);
136
137// static int fuse_vnop_whiteout(struct vnop_whiteout_args *ap);
138
139static int fuse_vnop_write(struct vnop_write_args *ap);
140
141
142#if M_MACFUSE_ENABLE_FIFOFS
143
144/* fifofs */
145
146int     fifo_ebadf(void *);
147
148static int fuse_fifo_vnop_close(struct vnop_close_args *);
149static int fuse_fifo_vnop_read(struct vnop_read_args *);
150static int fuse_fifo_vnop_write(struct vnop_write_args *);
151
152int     fifo_advlock(struct vnop_advlock_args *);
153int     fifo_close(struct vnop_close_args *);
154int     fifo_inactive(struct vnop_inactive_args *);
155int     fifo_ioctl(struct vnop_ioctl_args *);
156int     fifo_lookup(struct vnop_lookup_args *);
157int     fifo_open(struct vnop_open_args *);
158int     fifo_pathconf(struct vnop_pathconf_args *);
159int     fifo_read(struct vnop_read_args *);
160int     fifo_select(struct vnop_select_args *);
161int     fifo_write(struct vnop_write_args *);
162
163#define fifo_access   (int (*)(struct vnop_access_args *))fifo_ebadf
164#define fifo_blktooff (int (*)(struct vnop_blktooff_args *))err_blktooff
165#define fifo_bwrite   (int (*)(struct vnop_bwrite_args *))nullop
166#define fifo_create   (int (*)(struct vnop_create_args *))err_create
167#define fifo_fsync    (int (*)(struct vnop_fsync_args *))nullop
168#define fifo_getattr  (int (*)(struct vnop_getattr_args *))fifo_ebadf
169#define fifo_link     (int (*)(struct vnop_link_args *))err_link
170#define fifo_mkdir    (int (*)(struct vnop_mkdir_args *))err_mkdir
171#define fifo_mknod    (int (*)(struct vnop_mknod_args *))err_mknod
172#define fifo_mmap     (int (*)(struct vnop_mmap_args *))err_mmap
173#define fifo_readdir  (int (*)(struct vnop_readdir_args *))err_readdir
174#define fifo_readlink (int (*)(struct vnop_readlink_args *))err_readlink
175#define fifo_reclaim  (int (*)(struct vnop_reclaim_args *))nullop
176#define fifo_remove   (int (*)(struct vnop_remove_args *))err_remove
177#define fifo_rename   (int (*)(struct vnop_rename_args *))err_rename
178#define fifo_revoke   (int (*)(struct vnop_revoke_args *))nop_revoke
179#define fifo_rmdir    (int (*)(struct vnop_rmdir_args *))err_rmdir
180#define fifo_setattr  (int (*)(struct vnop_setattr_args *))fifo_ebadf
181#define fifo_strategy (int (*)(struct vnop_strategy_args *))err_strategy
182#define fifo_symlink  (int (*)(struct vnop_symlink_args *))err_symlink
183
184#endif /* M_MACFUSE_ENABLE_FIFOFS */
185
186#if M_MACFUSE_ENABLE_SPECFS
187
188/* specfs */
189
190int     spec_ebadf(void *);
191
192static int fuse_spec_vnop_close(struct vnop_close_args *);
193static int fuse_spec_vnop_read(struct vnop_read_args *);
194static int fuse_spec_vnop_write(struct vnop_write_args *);
195
196int     spec_blktooff(struct vnop_blktooff_args *);
197int     spec_blockmap(struct vnop_blockmap_args *);
198int     spec_close(struct vnop_close_args *);
199int     spec_fsync(struct vnop_fsync_args *);
200int     spec_ioctl(struct vnop_ioctl_args *);
201int     spec_lookup(struct vnop_lookup_args *);
202int     spec_offtoblk(struct vnop_offtoblk_args *);
203int     spec_open(struct vnop_open_args *);
204int     spec_pathconf(struct vnop_pathconf_args *);
205int     spec_read(struct vnop_read_args *);
206int     spec_select(struct vnop_select_args *);
207int     spec_strategy(struct vnop_strategy_args *);
208int     spec_write(struct vnop_write_args *);
209
210#define spec_access   (int (*)(struct vnop_access_args *))spec_ebadf
211#define spec_advlock  (int (*)(struct vnop_advlock_args *))err_advlock
212#define spec_bwrite   (int (*)(struct vnop_bwrite_args *))nop_bwrite
213#define spec_create   (int (*)(struct vnop_create_args *))err_create
214#define spec_getattr  (int (*)(struct vnop_getattr_args *))spec_ebadf
215#define spec_inactive (int (*)(struct vnop_inactive_args *))nop_inactive
216#define spec_link     (int (*)(struct vnop_link_args *))err_link
217#define spec_mkdir    (int (*)(struct vnop_mkdir_args *))err_mkdir
218#define spec_mknod    (int (*)(struct vnop_mknod_args *))err_mknod
219#define spec_mmap     (int (*)(struct vnop_mmap_args *))err_mmap
220#define spec_readdir  (int (*)(struct vnop_readdir_args *))err_readdir
221#define spec_readlink (int (*)(struct vnop_readlink_args *))err_readlink
222#define spec_reclaim  (int (*)(struct vnop_reclaim_args *))nop_reclaim
223#define spec_remove   (int (*)(struct vnop_remove_args *))err_remove
224#define spec_rename   (int (*)(struct vnop_rename_args *))err_rename
225#define spec_revoke   (int (*)(struct vnop_revoke_args *))nop_revoke
226#define spec_rmdir    (int (*)(struct vnop_rmdir_args *))err_rmdir
227#define spec_setattr  (int (*)(struct vnop_setattr_args *))spec_ebadf
228#define spec_symlink  (int (*)(struct vnop_symlink_args *))err_symlink
229
230#endif /* M_MACFUSE_ENABLE_SPECFS */
231
232#endif /* _FUSE_VNOPS_H_ */