diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2008-02-08 04:18:32 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 09:22:24 -0800 |
commit | a56d3fc74c0178c5f41c48315604d62cff4e746d (patch) | |
tree | a6049be18c706090b8c65dc4f6ff9398f880199d /fs/proc/array.c | |
parent | ee992744ea53db0a90c986fd0a70fbbf91e7f8bd (diff) | |
download | blackbird-obmc-linux-a56d3fc74c0178c5f41c48315604d62cff4e746d.tar.gz blackbird-obmc-linux-a56d3fc74c0178c5f41c48315604d62cff4e746d.zip |
seqfile convert proc_pid_statm
This conversion is just for code cleanliness, uniformity, and general safety.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r-- | fs/proc/array.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index 7e9f3b65f25b..5540e9575c6d 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -563,7 +563,8 @@ int proc_tgid_stat(struct seq_file *m, struct pid_namespace *ns, return do_task_stat(m, ns, pid, task, 1); } -int proc_pid_statm(struct task_struct *task, char *buffer) +int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns, + struct pid *pid, struct task_struct *task) { int size = 0, resident = 0, shared = 0, text = 0, lib = 0, data = 0; struct mm_struct *mm = get_task_mm(task); @@ -572,7 +573,8 @@ int proc_pid_statm(struct task_struct *task, char *buffer) size = task_statm(mm, &shared, &text, &data, &resident); mmput(mm); } + seq_printf(m, "%d %d %d %d %d %d %d\n", + size, resident, shared, text, lib, data, 0); - return sprintf(buffer, "%d %d %d %d %d %d %d\n", - size, resident, shared, text, lib, data, 0); + return 0; } |