summaryrefslogtreecommitdiffstats
path: root/sys/fs/coda/coda_vnops.h
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-12-01 23:16:38 +0000
committerphk <phk@FreeBSD.org>2004-12-01 23:16:38 +0000
commit59f305606cbc120b44978581149ef1a3e62bf3b4 (patch)
treef548d86b8998e8d581602fc54079bbb1534e7c18 /sys/fs/coda/coda_vnops.h
parent350be3accf1712e54ae2732ca42ad409bbf20df7 (diff)
downloadFreeBSD-src-59f305606cbc120b44978581149ef1a3e62bf3b4.zip
FreeBSD-src-59f305606cbc120b44978581149ef1a3e62bf3b4.tar.gz
Back when VOP_* was introduced, we did not have new-style struct
initializations but we did have lofty goals and big ideals. Adjust to more contemporary circumstances and gain type checking. Replace the entire vop_t frobbing thing with properly typed structures. The only casualty is that we can not add a new VOP_ method with a loadable module. History has not given us reason to belive this would ever be feasible in the the first place. Eliminate in toto VOCALL(), vop_t, VNODEOP_SET() etc. Give coda correct prototypes and function definitions for all vop_()s. Generate a bit more data from the vnode_if.src file: a struct vop_vector and protype typedefs for all vop methods. Add a new vop_bypass() and make vop_default be a pointer to another struct vop_vector. Remove a lot of vfs_init since vop_vector is ready to use from the compiler. Cast various vop_mumble() to void * with uppercase name, for instance VOP_PANIC, VOP_NULL etc. Implement VCALL() by making vdesc_offset the offsetof() the relevant function pointer in vop_vector. This is disgusting but since the code is generated by a script comparatively safe. The alternative for nullfs etc. would be much worse. Fix up all vnode method vectors to remove casts so they become typesafe. (The bulk of this is generated by scripts)
Diffstat (limited to 'sys/fs/coda/coda_vnops.h')
-rw-r--r--sys/fs/coda/coda_vnops.h54
1 files changed, 27 insertions, 27 deletions
diff --git a/sys/fs/coda/coda_vnops.h b/sys/fs/coda/coda_vnops.h
index 88a398e..8aae9b2 100644
--- a/sys/fs/coda/coda_vnops.h
+++ b/sys/fs/coda/coda_vnops.h
@@ -47,38 +47,38 @@
/* NetBSD interfaces to the vnodeops */
-int coda_open(void *);
-int coda_close(void *);
-int coda_read(void *);
-int coda_write(void *);
-int coda_ioctl(void *);
+vop_open_t coda_open;
+vop_close_t coda_close;
+vop_read_t coda_read;
+vop_write_t coda_write;
+vop_ioctl_t coda_ioctl;
/* 1.3 int cfs_select(void *);*/
-int coda_getattr(void *);
-int coda_setattr(void *);
-int coda_access(void *);
+vop_getattr_t coda_getattr;
+vop_setattr_t coda_setattr;
+vop_access_t coda_access;
int coda_abortop(void *);
-int coda_readlink(void *);
-int coda_fsync(void *);
-int coda_inactive(void *);
-int coda_lookup(void *);
-int coda_create(void *);
-int coda_remove(void *);
-int coda_link(void *);
-int coda_rename(void *);
-int coda_mkdir(void *);
-int coda_rmdir(void *);
-int coda_symlink(void *);
-int coda_readdir(void *);
-int coda_bmap(void *);
-int coda_strategy(void *);
-int coda_reclaim(void *);
-int coda_lock(void *);
-int coda_unlock(void *);
-int coda_islocked(void *);
+vop_readlink_t coda_readlink;
+vop_fsync_t coda_fsync;
+vop_inactive_t coda_inactive;
+vop_lookup_t coda_lookup;
+vop_create_t coda_create;
+vop_remove_t coda_remove;
+vop_link_t coda_link;
+vop_rename_t coda_rename;
+vop_mkdir_t coda_mkdir;
+vop_rmdir_t coda_rmdir;
+vop_symlink_t coda_symlink;
+vop_readdir_t coda_readdir;
+vop_bmap_t coda_bmap;
+vop_strategy_t coda_strategy;
+vop_reclaim_t coda_reclaim;
+vop_lock_t coda_lock;
+vop_unlock_t coda_unlock;
+vop_islocked_t coda_islocked;
int coda_vop_error(void *);
int coda_vop_nop(void *);
int coda_fbsd_getpages (void *);
-int coda_pathconf(void *);
+vop_pathconf_t coda_pathconf;
int coda_rdwr(struct vnode *vp, struct uio *uiop, enum uio_rw rw,
int ioflag, struct ucred *cred, struct thread *td);
OpenPOWER on IntegriCloud