diff options
| author | Jeff Roberson <jeff@FreeBSD.org> | 2002-09-23 05:50:07 +0000 |
|---|---|---|
| committer | Jeff Roberson <jeff@FreeBSD.org> | 2002-09-23 05:50:07 +0000 |
| commit | 155974701d3673f0d56859eb6cb62fa7745a445c (patch) | |
| tree | 0640b62a87dde8188e95e92643ca7260797c3564 /sys/tools | |
| parent | 33c06e1d3e788fa9d439855054e990c0acef8053 (diff) | |
Notes
Diffstat (limited to 'sys/tools')
| -rw-r--r-- | sys/tools/vnode_if.awk | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/tools/vnode_if.awk b/sys/tools/vnode_if.awk index d40bd4106785..7ff30c1e8a5b 100644 --- a/sys/tools/vnode_if.awk +++ b/sys/tools/vnode_if.awk @@ -191,6 +191,9 @@ while ((getline < srcfile) > 0) { # Get the function name. name = $1; uname = toupper(name); + + # Start constructing a ktrpoint string + ctrstr = "\"" uname; # Get the function arguments. for (numargs = 0; ; ++numargs) { if ((getline < srcfile) <= 0) { @@ -233,7 +236,27 @@ while ((getline < srcfile) > 0) { # remove trailing space (if any) sub(/ $/, ""); types[numargs] = $0; + + # We can do a maximum of 6 arguments to CTR* + if (numargs <= 6) { + if (numargs == 0) + ctrstr = ctrstr "(" args[numargs]; + else + ctrstr = ctrstr ", " args[numargs]; + if (types[numargs] ~ /\*/) + ctrstr = ctrstr " 0x%lX"; + else + ctrstr = ctrstr " %ld"; + } } + if (numargs > 6) + ctrargs = 6; + else + ctrargs = numargs; + ctrstr = "\tCTR" ctrargs "(KTR_VOP, " ctrstr ")\""; + for (i = 0; i < ctrargs; ++i) + ctrstr = ctrstr ", " args[i]; + ctrstr = ctrstr ");"; if (hfile) { # Print out the vop_F_args structure. @@ -260,6 +283,7 @@ while ((getline < srcfile) > 0) { add_debug_code(name, args[i], "Entry"); add_debug_pre(name); printh("\trc = VCALL(" args[0] ", VOFFSET(" name "), &a);"); + printh(ctrstr); printh("if (rc == 0) {"); for (i = 0; i < numargs; ++i) add_debug_code(name, args[i], "OK"); |
