Skip to contentSkip to conversation

fs/proc:Add '\n' in sprintf in function proc_pid_wchan().

PATCH New majianpeng 1 participant 1 message May 31, 2012

Subsystems (2)
lore
Share & tools
lore

majianpeng

author
#0 lore raw

PATCH 1/1 fs/proc:Add '\n' in sprintf in function proc_pid_wchan().

---
 fs/proc/base.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
fs/proc/base.c +2 -2
index d7d7118..206d153 100644
@@ -276,9 +276,9 @@ static int proc_pid_wchan(struct task_struct *task, char *buffer)
 		if (!ptrace_may_access(task, PTRACE_MODE_READ))
 			return 0;
 		else
-			return sprintf(buffer, "%lu", wchan);
+			return sprintf(buffer, "%lu\n", wchan);
 	else
-		return sprintf(buffer, "%s", symname);
+		return sprintf(buffer, "%s\n", symname);
 }
 #endif /* CONFIG_KALLSYMS */
 
Signature · 6 lines
1.7.5.4

 				
--------------
majianpeng
2012-05-31