Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121127
b: refs/heads/master
c: e6e7a65
h: refs/heads/master
i:
  121125: 0ca372b
  121123: 42a9cd3
  121119: b0b545d
v: v3
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Nov 16, 2008
1 parent 04630ad commit 4ec7ecb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 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: ee02a2e5c88ca2e4d6921f08d037b46d5bf82641
refs/heads/master: e6e7a65aabdb696cf05a56cfd495c49a11fd4cde
12 changes: 7 additions & 5 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -2655,6 +2655,9 @@ tracing_set_trace_write(struct file *filp, const char __user *ubuf,
char buf[max_tracer_type_len+1];
int i;
size_t ret;
int err;

ret = cnt;

if (cnt > max_tracer_type_len)
cnt = max_tracer_type_len;
Expand All @@ -2668,12 +2671,11 @@ tracing_set_trace_write(struct file *filp, const char __user *ubuf,
for (i = cnt - 1; i > 0 && isspace(buf[i]); i--)
buf[i] = 0;

ret = tracing_set_tracer(buf);
if (!ret)
ret = cnt;
err = tracing_set_tracer(buf);
if (err)
return err;

if (ret > 0)
filp->f_pos += ret;
filp->f_pos += ret;

return ret;
}
Expand Down

0 comments on commit 4ec7ecb

Please sign in to comment.