Commit 8bd6026e authored by Jim Cromie's avatar Jim Cromie Committed by Greg Kroah-Hartman

dynamic_debug: chop off comments in ddebug_tokenize

If a token begins with #, the remainder of query string is a comment,
so drop it.  Doing it here avoids '#' in quoted strings.
Signed-off-by: default avatarJim Cromie <jim.cromie@gmail.com>
Signed-off-by: default avatarJason Baron <jbaron@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e703ddae
...@@ -183,6 +183,8 @@ static int ddebug_tokenize(char *buf, char *words[], int maxwords) ...@@ -183,6 +183,8 @@ static int ddebug_tokenize(char *buf, char *words[], int maxwords)
buf = skip_spaces(buf); buf = skip_spaces(buf);
if (!*buf) if (!*buf)
break; /* oh, it was trailing whitespace */ break; /* oh, it was trailing whitespace */
if (*buf == '#')
break; /* token starts comment, skip rest of line */
/* find `end' of word, whitespace separated or quoted */ /* find `end' of word, whitespace separated or quoted */
if (*buf == '"' || *buf == '\'') { if (*buf == '"' || *buf == '\'') {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment