mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 21:02:19 +00:00
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: Jim Cromie <jim.cromie@gmail.com> Signed-off-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
e703ddae38
commit
8bd6026e88
@ -183,6 +183,8 @@ static int ddebug_tokenize(char *buf, char *words[], int maxwords)
|
||||
buf = skip_spaces(buf);
|
||||
if (!*buf)
|
||||
break; /* oh, it was trailing whitespace */
|
||||
if (*buf == '#')
|
||||
break; /* token starts comment, skip rest of line */
|
||||
|
||||
/* find `end' of word, whitespace separated or quoted */
|
||||
if (*buf == '"' || *buf == '\'') {
|
||||
|
Loading…
Reference in New Issue
Block a user