diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2014-06-20 13:38:54 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2014-07-01 07:13:35 -0400 |
commit | 12306276fabcb746a14979e96f43a13c724dec49 (patch) | |
tree | 566588d71d1f32c4cc07dd600892ed75214eb463 /kernel/trace/trace.c | |
parent | 5c27c775d5e698d5b754d213747e9fb85290e3b8 (diff) | |
download | op-kernel-dev-12306276fabcb746a14979e96f43a13c724dec49.zip op-kernel-dev-12306276fabcb746a14979e96f43a13c724dec49.tar.gz |
tracing: Move the trace_seq_* functions into its own trace_seq.c file
The trace_seq_*() functions are a nice utility that allows users to manipulate
buffers with printf() like formats. It has its own trace_seq.h header in
include/linux and should be in its own file. Being tied with trace_output.c
is rather awkward.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 384ede3..eeb233c 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -923,30 +923,6 @@ out: return ret; } -ssize_t trace_seq_to_user(struct trace_seq *s, char __user *ubuf, size_t cnt) -{ - int len; - int ret; - - if (!cnt) - return 0; - - if (s->len <= s->readpos) - return -EBUSY; - - len = s->len - s->readpos; - if (cnt > len) - cnt = len; - ret = copy_to_user(ubuf, s->buffer + s->readpos, cnt); - if (ret == cnt) - return -EFAULT; - - cnt -= ret; - - s->readpos += cnt; - return cnt; -} - static ssize_t trace_seq_to_buffer(struct trace_seq *s, void *buf, size_t cnt) { int len; |