Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140815
b: refs/heads/master
c: 5c6a3ae
h: refs/heads/master
i:
  140813: abb9e25
  140811: 2821406
  140807: 771f109
  140799: 06625dc
v: v3
  • Loading branch information
Steven Rostedt committed Feb 27, 2009
1 parent 97c1f74 commit 75c7a7a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 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: 85a2f9b46f8cd8aaa11c64c715e1ea3ec27ec486
refs/heads/master: 5c6a3ae1b4beebb56e2916b84f1208d96a9e32ff
13 changes: 6 additions & 7 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -2037,7 +2037,7 @@ tracing_trace_options_read(struct file *filp, char __user *ubuf,
/* calculate max size */
for (i = 0; trace_options[i]; i++) {
len += strlen(trace_options[i]);
len += 3; /* "no" and space */
len += 3; /* "no" and newline */
}

mutex_lock(&trace_types_lock);
Expand All @@ -2050,7 +2050,7 @@ tracing_trace_options_read(struct file *filp, char __user *ubuf,
*/
for (i = 0; trace_opts[i].name; i++) {
len += strlen(trace_opts[i].name);
len += 3; /* "no" and space */
len += 3; /* "no" and newline */
}

/* +2 for \n and \0 */
Expand All @@ -2062,22 +2062,21 @@ tracing_trace_options_read(struct file *filp, char __user *ubuf,

for (i = 0; trace_options[i]; i++) {
if (trace_flags & (1 << i))
r += sprintf(buf + r, "%s ", trace_options[i]);
r += sprintf(buf + r, "%s\n", trace_options[i]);
else
r += sprintf(buf + r, "no%s ", trace_options[i]);
r += sprintf(buf + r, "no%s\n", trace_options[i]);
}

for (i = 0; trace_opts[i].name; i++) {
if (tracer_flags & trace_opts[i].bit)
r += sprintf(buf + r, "%s ",
r += sprintf(buf + r, "%s\n",
trace_opts[i].name);
else
r += sprintf(buf + r, "no%s ",
r += sprintf(buf + r, "no%s\n",
trace_opts[i].name);
}
mutex_unlock(&trace_types_lock);

r += sprintf(buf + r, "\n");
WARN_ON(r >= len + 2);

r = simple_read_from_buffer(ubuf, cnt, ppos, buf, r);
Expand Down

0 comments on commit 75c7a7a

Please sign in to comment.