[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/3] tracetool: dtrace: handle in and next reserved
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 3/3] tracetool: dtrace: handle in and next reserved words |
Date: |
Fri, 30 Mar 2012 11:58:06 +0100 |
From: Alon Levy <address@hidden>
Signed-off-by: Alon Levy <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
scripts/tracetool | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/scripts/tracetool b/scripts/tracetool
index a279c2c..5e77aa2 100755
--- a/scripts/tracetool
+++ b/scripts/tracetool
@@ -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
--
1.7.9.1