From: Jim Cromie Date: Mon, 19 Dec 2011 22:13:03 +0000 (-0500) Subject: dynamic_debug: chop off comments in ddebug_tokenize X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8bd6026e88cb2eb1e60ee40c7a1a0786b2db6623;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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 Signed-off-by: Jason Baron Signed-off-by: Greg Kroah-Hartman --- diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 4be55d8d76b8..86a9abb9a1ce 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -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 == '\'') {