aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-02-27 00:22:21 -0500
committerSteven Rostedt <srostedt@redhat.com>2009-02-27 00:22:21 -0500
commit5c6a3ae1b4beebb56e2916b84f1208d96a9e32ff (patch)
tree6267a70386ce9e97e0034eea3754ea24429e971c /kernel/trace
parent85a2f9b46f8cd8aaa11c64c715e1ea3ec27ec486 (diff)
tracing: use newline separator for trace options list
Impact: clean up Instead of listing the trace options like: # cat /debug/tracing/trace_options print-parent nosym-offset nosym-addr noverbose noraw nohex nobin noblock nostacktrace nosched-tree ftrace_printk noftrace_preempt nobranch annotate nouserstacktrace nosym-userobj We now list them like: # cat /debug/tracing/trace_options print-parent nosym-offset nosym-addr noverbose noraw nohex nobin noblock nostacktrace nosched-tree ftrace_printk noftrace_preempt nobranch annotate nouserstacktrace nosym-userobj Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 304e02ce39c4..5db7485158df 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2037,7 +2037,7 @@ tracing_trace_options_read(struct file *filp, char __user *ubuf,
2037 /* calculate max size */ 2037 /* calculate max size */
2038 for (i = 0; trace_options[i]; i++) { 2038 for (i = 0; trace_options[i]; i++) {
2039 len += strlen(trace_options[i]); 2039 len += strlen(trace_options[i]);
2040 len += 3; /* "no" and space */ 2040 len += 3; /* "no" and newline */
2041 } 2041 }
2042 2042
2043 mutex_lock(&trace_types_lock); 2043 mutex_lock(&trace_types_lock);
@@ -2050,7 +2050,7 @@ tracing_trace_options_read(struct file *filp, char __user *ubuf,
2050 */ 2050 */
2051 for (i = 0; trace_opts[i].name; i++) { 2051 for (i = 0; trace_opts[i].name; i++) {
2052 len += strlen(trace_opts[i].name); 2052 len += strlen(trace_opts[i].name);
2053 len += 3; /* "no" and space */ 2053 len += 3; /* "no" and newline */
2054 } 2054 }
2055 2055
2056 /* +2 for \n and \0 */ 2056 /* +2 for \n and \0 */
@@ -2062,22 +2062,21 @@ tracing_trace_options_read(struct file *filp, char __user *ubuf,
2062 2062
2063 for (i = 0; trace_options[i]; i++) { 2063 for (i = 0; trace_options[i]; i++) {
2064 if (trace_flags & (1 << i)) 2064 if (trace_flags & (1 << i))
2065 r += sprintf(buf + r, "%s ", trace_options[i]); 2065 r += sprintf(buf + r, "%s\n", trace_options[i]);
2066 else 2066 else
2067 r += sprintf(buf + r, "no%s ", trace_options[i]); 2067 r += sprintf(buf + r, "no%s\n", trace_options[i]);
2068 } 2068 }
2069 2069
2070 for (i = 0; trace_opts[i].name; i++) { 2070 for (i = 0; trace_opts[i].name; i++) {
2071 if (tracer_flags & trace_opts[i].bit) 2071 if (tracer_flags & trace_opts[i].bit)
2072 r += sprintf(buf + r, "%s ", 2072 r += sprintf(buf + r, "%s\n",
2073 trace_opts[i].name); 2073 trace_opts[i].name);
2074 else 2074 else
2075 r += sprintf(buf + r, "no%s ", 2075 r += sprintf(buf + r, "no%s\n",
2076 trace_opts[i].name); 2076 trace_opts[i].name);
2077 } 2077 }
2078 mutex_unlock(&trace_types_lock); 2078 mutex_unlock(&trace_types_lock);
2079 2079
2080 r += sprintf(buf + r, "\n");
2081 WARN_ON(r >= len + 2); 2080 WARN_ON(r >= len + 2);
2082 2081
2083 r = simple_read_from_buffer(ubuf, cnt, ppos, buf, r); 2082 r = simple_read_from_buffer(ubuf, cnt, ppos, buf, r);