]> git.proxmox.com Git - qemu.git/commitdiff
tracetool: Forbid argument name 'next'
authorKevin Wolf <kwolf@redhat.com>
Mon, 12 Mar 2012 09:30:02 +0000 (10:30 +0100)
committerKevin Wolf <kwolf@redhat.com>
Thu, 5 Apr 2012 12:54:39 +0000 (14:54 +0200)
It has happened more than once that patches that look perfectly sane
and work with simpletrace broke systemtap because they use 'next' as an
argument name for a tracing function. However, 'next' is a keyword for
systemtap, so we shouldn't use it.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
scripts/tracetool

index 47389b62eac68d3d4bc6cd401b4b13aac3b205d9..7b1c142b67657e5a960e069046f5b0a41993ebdc 100755 (executable)
@@ -81,6 +81,10 @@ get_args()
     args=${1#*\(}
     args=${args%%\)*}
     echo "$args"
+
+    if (echo "$args" | grep "[ *]next\($\|[, ]\)" > /dev/null 2>&1); then
+        echo -e "\n#error 'next' is a bad argument name (clash with systemtap keyword)\n "
+    fi
 }
 
 # Get the argument name list of a trace event