tracetool: dtrace: handle in and next reserved words

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This commit is contained in:
Alon Levy 2012-03-29 23:35:36 +02:00 committed by Stefan Hajnoczi
parent 60be795f0b
commit 703e01e6e2

View File

@ -506,10 +506,12 @@ EOF
i=1
for arg in $arglist
do
# 'limit' is a reserved keyword
if [ "$arg" = "limit" ]; then
arg="_limit"
fi
# postfix reserved words with '_'
case "$arg" in
limit|in|next|self)
arg="${arg}_"
;;
esac
cat <<EOF
$arg = \$arg$i;
EOF