[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/2] tracetool: Forbid argument name 'next'
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 2/2] tracetool: Forbid argument name 'next' |
Date: |
Mon, 12 Mar 2012 10:34:28 +0100 |
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 <address@hidden>
---
scripts/tracetool | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/scripts/tracetool b/scripts/tracetool
index 4c9951d..f892af4 100755
--- a/scripts/tracetool
+++ b/scripts/tracetool
@@ -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
--
1.7.6.5