From mboxrd@z Thu Jan 1 00:00:00 1970 From: "majianpeng" Subject: [PATCH] fs/proc:Add '\n' in sprintf in function proc_pid_wchan(). Date: Thu, 31 May 2012 09:56:03 +0800 Message-ID: <201205310955563595414@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: "linux-fsdevel" To: "viro" Return-path: Received: from mail-pz0-f46.google.com ([209.85.210.46]:45421 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757656Ab2EaBzN (ORCPT ); Wed, 30 May 2012 21:55:13 -0400 Received: by dady13 with SMTP id y13so582072dad.19 for ; Wed, 30 May 2012 18:55:12 -0700 (PDT) Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Signed-off-by: majianpeng --- fs/proc/base.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index d7d7118..206d153 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -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 */ -- 1.7.5.4 -------------- majianpeng 2012-05-31