]> Git Repo - qemu.git/commitdiff
tracetool: dtrace: handle in and next reserved words
authorAlon Levy <[email protected]>
Thu, 29 Mar 2012 21:35:36 +0000 (23:35 +0200)
committerStefan Hajnoczi <[email protected]>
Fri, 30 Mar 2012 10:55:21 +0000 (11:55 +0100)
Signed-off-by: Alon Levy <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
scripts/tracetool

index a279c2c58b07b9dec275a9d28bece55e93329f91..5e77aa243d25539764491b3968ee19ae210b8808 100755 (executable)
@@ -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
This page took 0.028863 seconds and 4 git commands to generate.