summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_seq.c
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2014-10-29 18:48:37 +0100
committerSteven Rostedt <rostedt@goodmis.org>2014-11-20 04:01:10 +0100
commitdd23180aacf4b27d48f40b27249f1e58c8df03be (patch)
tree18b658af8993237ed6194dc5328de7d182df6a59 /kernel/trace/trace_seq.c
parenttracing: Create seq_buf layer in trace_seq (diff)
downloadlinux-dd23180aacf4b27d48f40b27249f1e58c8df03be.tar.xz
linux-dd23180aacf4b27d48f40b27249f1e58c8df03be.zip
tracing: Convert seq_buf_path() to be like seq_path()
Rewrite seq_buf_path() like it is done in seq_path() and allow it to accept any escape character instead of just "\n". Making seq_buf_path() like seq_path() will help prevent problems when converting seq_file to use the seq_buf logic. Link: http://lkml.kernel.org/r/20141104160222.048795666@goodmis.org Link: http://lkml.kernel.org/r/20141114011412.338523371@goodmis.org Tested-by: Jiri Kosina <jkosina@suse.cz> Acked-by: Jiri Kosina <jkosina@suse.cz> Reviewed-by: Petr Mladek <pmladek@suse.cz> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_seq.c')
-rw-r--r--kernel/trace/trace_seq.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/trace/trace_seq.c b/kernel/trace/trace_seq.c
index 8c0c54fe674b..74cacc930c24 100644
--- a/kernel/trace/trace_seq.c
+++ b/kernel/trace/trace_seq.c
@@ -326,7 +326,6 @@ EXPORT_SYMBOL_GPL(trace_seq_putmem_hex);
int trace_seq_path(struct trace_seq *s, const struct path *path)
{
unsigned int save_len = s->seq.len;
- int ret;
if (s->full)
return 0;
@@ -338,7 +337,7 @@ int trace_seq_path(struct trace_seq *s, const struct path *path)
return 0;
}
- ret = seq_buf_path(&s->seq, path);
+ seq_buf_path(&s->seq, path, "\n");
if (unlikely(seq_buf_has_overflowed(&s->seq))) {
s->seq.len = save_len;
@@ -346,7 +345,7 @@ int trace_seq_path(struct trace_seq *s, const struct path *path)
return 0;
}
- return ret;
+ return 1;
}
EXPORT_SYMBOL_GPL(trace_seq_path);