Commit fa6b8733 authored by Kevin Wolf's avatar Kevin Wolf
Browse files

tracetool: Forbid argument name 'next'



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: default avatarKevin Wolf <kwolf@redhat.com>
parent bfe24e1a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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