aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/ftrace.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-09-06 00:11:38 -0400
committerIngo Molnar <mingo@elte.hu>2009-09-06 00:11:42 -0400
commited011b22ce567eabefa9ea571d3721c10ecd0553 (patch)
treec7aee6684613075c772388a99a9137014549434e /kernel/trace/ftrace.c
parent85bac32c4a52c592b857f2c360cc5ec93a097d70 (diff)
parente07cccf4046978df10f2e13fe2b99b2f9b3a65db (diff)
Merge commit 'v2.6.31-rc9' into tracing/core
Merge reason: move from -rc5 to -rc9. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r--kernel/trace/ftrace.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 1993b7186cdb..8c804e24f96f 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -2222,7 +2222,11 @@ ftrace_regex_write(struct file *file, const char __user *ubuf,
2222 read++; 2222 read++;
2223 cnt--; 2223 cnt--;
2224 2224
2225 if (!(iter->flags & ~FTRACE_ITER_CONT)) { 2225 /*
2226 * If the parser haven't finished with the last write,
2227 * continue reading the user input without skipping spaces.
2228 */
2229 if (!(iter->flags & FTRACE_ITER_CONT)) {
2226 /* skip white space */ 2230 /* skip white space */
2227 while (cnt && isspace(ch)) { 2231 while (cnt && isspace(ch)) {
2228 ret = get_user(ch, ubuf++); 2232 ret = get_user(ch, ubuf++);
@@ -2232,8 +2236,9 @@ ftrace_regex_write(struct file *file, const char __user *ubuf,
2232 cnt--; 2236 cnt--;
2233 } 2237 }
2234 2238
2239 /* only spaces were written */
2235 if (isspace(ch)) { 2240 if (isspace(ch)) {
2236 file->f_pos += read; 2241 *ppos += read;
2237 ret = read; 2242 ret = read;
2238 goto out; 2243 goto out;
2239 } 2244 }
@@ -2262,12 +2267,12 @@ ftrace_regex_write(struct file *file, const char __user *ubuf,
2262 if (ret) 2267 if (ret)
2263 goto out; 2268 goto out;
2264 iter->buffer_idx = 0; 2269 iter->buffer_idx = 0;
2265 } else 2270 } else {
2266 iter->flags |= FTRACE_ITER_CONT; 2271 iter->flags |= FTRACE_ITER_CONT;
2272 iter->buffer[iter->buffer_idx++] = ch;
2273 }
2267 2274
2268 2275 *ppos += read;
2269 file->f_pos += read;
2270
2271 ret = read; 2276 ret = read;
2272 out: 2277 out:
2273 mutex_unlock(&ftrace_regex_lock); 2278 mutex_unlock(&ftrace_regex_lock);