[PATCH 05/11] tracing: use << to print < instead of \<
From: Steven Rostedt
Date: Wed Jun 10 2009 - 01:44:05 EST
From: Steven Rostedt <srostedt@xxxxxxxxxx>
The print formats are passed through sprintf for processing. This means that
we can not use % or \ unless we process it for printk. Trying to use \< to
print a single < breaks the sprintf processing.
Instead, to print a single '<' a '<<' is used instead.
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
kernel/trace/trace_read_binary.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/trace/trace_read_binary.c b/kernel/trace/trace_read_binary.c
index a4b5eaa..d005138 100644
--- a/kernel/trace/trace_read_binary.c
+++ b/kernel/trace/trace_read_binary.c
@@ -35,7 +35,7 @@ static struct trace_seq buffer;
* FALSE := print when field is zero or NULL
* NAME := the name to write when a match is found
*
- * A '\<' would print '<'
+ * A '<<' would print '<'
*
* Commands:
* int : Print the field out as an signed integer. The size of the field
@@ -555,11 +555,11 @@ ftrace_initialize_print(struct ftrace_event_call *event, const char *fmt, ...)
goto err_free;
break;
}
- if (*(tok - 1) == '\\') {
+ if (*(tok + 1) == '<') {
ret = add_less_than(event, fmt, tok);
if (ret)
goto err_free;
- fmt = tok + 1;
+ fmt = tok + 2;
continue;
}
--
1.6.3.1
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/