Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304860
b: refs/heads/master
c: 5a26c8f
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and Steven Rostedt committed Apr 24, 2012
1 parent 41fc9e3 commit 039a852
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 07d777fe8c3985bc83428c2866713c2d1b3d4129
refs/heads/master: 5a26c8f0cf1e95106858bb4e23ca6dd14c9b842f
5 changes: 1 addition & 4 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,17 +629,14 @@ ssize_t trace_seq_to_user(struct trace_seq *s, char __user *ubuf, size_t cnt)
static ssize_t trace_seq_to_buffer(struct trace_seq *s, void *buf, size_t cnt)
{
int len;
void *ret;

if (s->len <= s->readpos)
return -EBUSY;

len = s->len - s->readpos;
if (cnt > len)
cnt = len;
ret = memcpy(buf, s->buffer + s->readpos, cnt);
if (!ret)
return -EFAULT;
memcpy(buf, s->buffer + s->readpos, cnt);

s->readpos += cnt;
return cnt;
Expand Down

0 comments on commit 039a852

Please sign in to comment.