summaryrefslogtreecommitdiffstats
path: root/sys/gnu/fs/ext2fs/ext2_extern.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/gnu/fs/ext2fs/ext2_extern.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/gnu/fs/ext2fs/ext2_extern.h')
-rw-r--r--sys/gnu/fs/ext2fs/ext2_extern.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/gnu/fs/ext2fs/ext2_extern.h b/sys/gnu/fs/ext2fs/ext2_extern.h
index 8e73723..57c62b1 100644
--- a/sys/gnu/fs/ext2fs/ext2_extern.h
+++ b/sys/gnu/fs/ext2fs/ext2_extern.h
@@ -74,7 +74,7 @@ int ext2_truncate(struct vnode *, off_t, int, struct ucred *, struct thread *);
int ext2_update(struct vnode *, int);
int ext2_valloc(struct vnode *, int, struct ucred *, struct vnode **);
int ext2_vfree(struct vnode *, ino_t, int);
-int ext2_vinit(struct mount *, vop_t **, struct vnode **vpp);
+int ext2_vinit(struct mount *, struct vop_vector *, struct vnode **vpp);
int ext2_lookup(struct vop_cachedlookup_args *);
int ext2_readdir(struct vop_readdir_args *);
void ext2_print_inode(struct inode *);
@@ -105,7 +105,7 @@ void mark_buffer_dirty(struct buf *bh);
#define B_METAONLY 0x04 /* Return indirect block buffer. */
#define B_NOWAIT 0x08 /* do not sleep to await lock */
-extern vop_t **ext2_vnodeop_p;
-extern vop_t **ext2_fifoop_p;
+extern struct vop_vector ext2_vnodeops;
+extern struct vop_vector ext2_fifoops;
#endif /* !_SYS_GNU_EXT2FS_EXT2_EXTERN_H_ */
OpenPOWER on IntegriCloud