vnode_if.awk (158936) | vnode_if.awk (159082) |
---|---|
1#!/usr/bin/awk -f 2 3#- 4# Copyright (c) 1992, 1993 5# The Regents of the University of California. All rights reserved. 6# 7# Redistribution and use in source and binary forms, with or without 8# modification, are permitted provided that the following conditions --- 16 unchanged lines hidden (view full) --- 25# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29# SUCH DAMAGE. 30 31# 32# @(#)vnode_if.sh 8.1 (Berkeley) 6/10/93 | 1#!/usr/bin/awk -f 2 3#- 4# Copyright (c) 1992, 1993 5# The Regents of the University of California. All rights reserved. 6# 7# Redistribution and use in source and binary forms, with or without 8# modification, are permitted provided that the following conditions --- 16 unchanged lines hidden (view full) --- 25# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29# SUCH DAMAGE. 30 31# 32# @(#)vnode_if.sh 8.1 (Berkeley) 6/10/93 |
33# $FreeBSD: head/sys/tools/vnode_if.awk 158936 2006-05-26 07:13:26Z dds $ | 33# $FreeBSD: head/sys/tools/vnode_if.awk 159082 2006-05-30 20:49:54Z dds $ |
34# 35# Script to produce VFS front-end sugar. 36# 37# usage: vnode_if.awk <srcfile> [-c | -h | -p | -q] 38# (where <srcfile> is currently /sys/kern/vnode_if.src) 39# The source file must have a .src extension 40# 41 --- 100 unchanged lines hidden (view full) --- 142if (!srcfile) 143 usage(); 144 145common_head = \ 146 "/*\n" \ 147 " * This file is produced automatically.\n" \ 148 " * Do not modify anything in here by hand.\n" \ 149 " *\n" \ | 34# 35# Script to produce VFS front-end sugar. 36# 37# usage: vnode_if.awk <srcfile> [-c | -h | -p | -q] 38# (where <srcfile> is currently /sys/kern/vnode_if.src) 39# The source file must have a .src extension 40# 41 --- 100 unchanged lines hidden (view full) --- 142if (!srcfile) 143 usage(); 144 145common_head = \ 146 "/*\n" \ 147 " * This file is produced automatically.\n" \ 148 " * Do not modify anything in here by hand.\n" \ 149 " *\n" \ |
150 " * Created from $FreeBSD: head/sys/tools/vnode_if.awk 158936 2006-05-26 07:13:26Z dds $\n" \ | 150 " * Created from $FreeBSD: head/sys/tools/vnode_if.awk 159082 2006-05-30 20:49:54Z dds $\n" \ |
151 " */\n" \ 152 "\n"; 153 154if (pfile) { 155 printp(common_head) 156 printp("struct vop_vector {") 157 printp("\tstruct vop_vector\t*vop_default;") 158 printp("\tvop_bypass_t\t*vop_bypass;") --- 27 unchanged lines hidden (view full) --- 186 " VDESC_NO_OFFSET,\n" \ 187 " VDESC_NO_OFFSET,\n" \ 188 "};\n"); 189} 190 191while ((getline < srcfile) > 0) { 192 if (NF == 0) 193 continue; | 151 " */\n" \ 152 "\n"; 153 154if (pfile) { 155 printp(common_head) 156 printp("struct vop_vector {") 157 printp("\tstruct vop_vector\t*vop_default;") 158 printp("\tvop_bypass_t\t*vop_bypass;") --- 27 unchanged lines hidden (view full) --- 186 " VDESC_NO_OFFSET,\n" \ 187 " VDESC_NO_OFFSET,\n" \ 188 "};\n"); 189} 190 191while ((getline < srcfile) > 0) { 192 if (NF == 0) 193 continue; |
194 if ($1 ~ /^#%/) { 195 if (NF != 6 || $1 != "#%" || \ | 194 if ($1 ~ /^%%/) { 195 if (NF != 6 || $1 != "%%" || \ |
196 $2 !~ /^[a-z]+$/ || $3 !~ /^[a-z]+$/ || \ 197 $4 !~ /^.$/ || $5 !~ /^.$/ || $6 !~ /^.$/) 198 continue; 199 lockdata["vop_" $2, $3, "Entry"] = $4; 200 lockdata["vop_" $2, $3, "OK"] = $5; 201 lockdata["vop_" $2, $3, "Error"] = $6; 202 continue; 203 } 204 | 196 $2 !~ /^[a-z]+$/ || $3 !~ /^[a-z]+$/ || \ 197 $4 !~ /^.$/ || $5 !~ /^.$/ || $6 !~ /^.$/) 198 continue; 199 lockdata["vop_" $2, $3, "Entry"] = $4; 200 lockdata["vop_" $2, $3, "OK"] = $5; 201 lockdata["vop_" $2, $3, "Error"] = $6; 202 continue; 203 } 204 |
205 if ($1 ~ /^#!/) { 206 if (NF != 4 || $1 != "#!") | 205 if ($1 ~ /^%!/) { 206 if (NF != 4 || $1 != "%!") |
207 continue; 208 if ($3 != "pre" && $3 != "post") 209 continue; 210 lockdata["vop_" $2, $3] = $4; 211 continue; 212 } | 207 continue; 208 if ($3 != "pre" && $3 != "post") 209 continue; 210 lockdata["vop_" $2, $3] = $4; 211 continue; 212 } |
213 if ($1 ~ /^#/) | 213 if ($1 ~ /^#/ || $0 ~ /^$/) |
214 continue; 215 216 # Get the function name. 217 name = $1; 218 uname = toupper(name); 219 220 # Start constructing a ktrpoint string 221 ctrstr = "\"" uname; --- 212 unchanged lines hidden --- | 214 continue; 215 216 # Get the function name. 217 name = $1; 218 uname = toupper(name); 219 220 # Start constructing a ktrpoint string 221 ctrstr = "\"" uname; --- 212 unchanged lines hidden --- |