diff options
author | bde <bde@FreeBSD.org> | 1995-09-11 16:05:16 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-09-11 16:05:16 +0000 |
commit | 4de4f43cd0706773d2b5e2cce05186f6f18fc961 (patch) | |
tree | 42cc67bde5bece50507efa4ceee335fb25828619 /sys/tools | |
parent | c9f41717da580b4f6daa8d56a344a098f50c84f5 (diff) | |
download | FreeBSD-src-4de4f43cd0706773d2b5e2cce05186f6f18fc961.zip FreeBSD-src-4de4f43cd0706773d2b5e2cce05186f6f18fc961.tar.gz |
Generate prototypes for VOP functions. I decided to keep the old-style
definitions even though the functions are inline. If vnode_if.h was
compiled by a non-ANSI compiler, then `inline' would be defined away,
so vnode_if.h might compile correctly.
Diffstat (limited to 'sys/tools')
-rw-r--r-- | sys/tools/vnode_if.awk | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/sys/tools/vnode_if.awk b/sys/tools/vnode_if.awk index 37d53bd..b89ca15 100644 --- a/sys/tools/vnode_if.awk +++ b/sys/tools/vnode_if.awk @@ -32,7 +32,7 @@ # SUCH DAMAGE. # # @(#)vnode_if.sh 8.1 (Berkeley) 6/10/93 -# $Id: vnode_if.sh,v 1.4 1995/08/01 18:50:40 davidg Exp $ +# $Id: vnode_if.sh,v 1.5 1995/09/04 00:20:18 dyson Exp $ # # Script to produce VFS front-end sugar. @@ -116,6 +116,27 @@ $AWK ' # Print out extern declaration. printf("extern struct vnodeop_desc %s_desc;\n", name); + # Print out prototype. + printf("static int %s __P((\n", uname); + sep = ",\n"; + for (c2 = 0; c2 < c1; ++c2) { + if (c2 == c1 - 1) + sep = "));\n"; + c3 = split(a[c2], t); + printf("\t"); + if (t[2] ~ "WILLRELE") + c4 = 3; + else + c4 = 2; + for (; c4 < c3; ++c4) + printf("%s ", t[c4]); + beg = match(t[c3], "[^*]"); + end = match(t[c3], ";"); + printf("%s%s%s", + substr(t[c4], 0, beg - 1), + substr(t[c4], beg, end - beg), sep); + } + # Print out inline struct. printf("static inline int %s(", uname); sep = ", "; @@ -353,6 +374,8 @@ struct vop_strategy_args { struct buf *a_bp; }; extern struct vnodeop_desc vop_strategy_desc; +static int VOP_STRATEGY __P(( + struct buf *bp)); static inline int VOP_STRATEGY(bp) struct buf *bp; { @@ -368,6 +391,8 @@ struct vop_bwrite_args { struct buf *a_bp; }; extern struct vnodeop_desc vop_bwrite_desc; +static int VOP_BWRITE __P(( + struct buf *bp)); static inline int VOP_BWRITE(bp) struct buf *bp; { |