summaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2008-02-05 07:27:21 +0100
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 18:44:07 +0100
commit59714d65dfbc86d5cb93adc5bac57a921cc2fa84 (patch)
tree10eda85ccab88fb707d6c6b4f4fb7f2e9bd1f4e1 /fs/exec.c
parentlockdep: annotate epoll (diff)
downloadlinux-59714d65dfbc86d5cb93adc5bac57a921cc2fa84.tar.xz
linux-59714d65dfbc86d5cb93adc5bac57a921cc2fa84.zip
get_task_comm(): return the result
It was dumb to make get_task_comm() return void. Change it to return a pointer to the resulting output for caller convenience. Cc: Ulrich Drepper <drepper@redhat.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 282240afe99e..966c5c5b6741 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -947,12 +947,13 @@ static void flush_old_files(struct files_struct * files)
spin_unlock(&files->file_lock);
}
-void get_task_comm(char *buf, struct task_struct *tsk)
+char *get_task_comm(char *buf, struct task_struct *tsk)
{
/* buf must be at least sizeof(tsk->comm) in size */
task_lock(tsk);
strncpy(buf, tsk->comm, sizeof(tsk->comm));
task_unlock(tsk);
+ return buf;
}
void set_task_comm(struct task_struct *tsk, char *buf)