[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <cda19a348ff2b35c7bd9b60584174396d0ec2b2b.1324318997.git.jbaron@redhat.com>
Date: Mon, 19 Dec 2011 17:13:03 -0500
From: Jason Baron <jbaron@...hat.com>
To: greg@...ah.com
Cc: jim.cromie@...il.com, joe@...ches.com, bart.vanassche@...il.com,
linux-kernel@...r.kernel.org
Subject: [PATCH 12/16] dynamic_debug: chop off comments in ddebug_tokenize
From: Jim Cromie <jim.cromie@...il.com>
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@...il.com>
Signed-off-by: Jason Baron <jbaron@...hat.com>
---
lib/dynamic_debug.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 4be55d8..86a9abb 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 == '\'') {
--
1.7.7.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists