[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PATCH v3 1/2] tracetool: dtrace: handle in and next rese
From: |
Alon Levy |
Subject: |
[Qemu-trivial] [PATCH v3 1/2] tracetool: dtrace: handle in and next reserved words |
Date: |
Thu, 29 Mar 2012 23:35:36 +0200 |
Signed-off-by: Alon Levy <address@hidden>
---
I think I need a qemu-trivial-review too ;)
v3:
added self (Lee Essen)
use post '_' (Stefan Hajnoczi)
use case/esca (Eric Blake & Peter Maydell)
scripts/tracetool | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/scripts/tracetool b/scripts/tracetool
index 65bd0a1..ab788f2 100755
--- a/scripts/tracetool
+++ b/scripts/tracetool
@@ -494,10 +494,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.3
- [Qemu-trivial] [PATCH v3 1/2] tracetool: dtrace: handle in and next reserved words,
Alon Levy <=