Commit:     59714d65dfbc86d5cb93adc5bac57a921cc2fa84
Parent:     0ccf831cbee94df9c5006dd46248c0f07847dd7c
Author:     Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 22:27:21 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Feb 5 09:44:07 2008 -0800

    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 <[EMAIL PROTECTED]>
    Cc: Ingo Molnar <[EMAIL PROTECTED]>
    Cc: Roland McGrath <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 fs/exec.c             |    3 ++-
 include/linux/sched.h |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/exec.c b/fs/exec.c
index 282240a..966c5c5 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -947,12 +947,13 @@ static void flush_old_files(struct files_struct * files)
-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 */
        strncpy(buf, tsk->comm, sizeof(tsk->comm));
+       return buf;
 void set_task_comm(struct task_struct *tsk, char *buf)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index af6947e..680bb03 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1770,7 +1770,7 @@ extern long do_fork(unsigned long, unsigned long, struct 
pt_regs *, unsigned lon
 struct task_struct *fork_idle(int);
 extern void set_task_comm(struct task_struct *tsk, char *from);
-extern void get_task_comm(char *to, struct task_struct *tsk);
+extern char *get_task_comm(char *to, struct task_struct *tsk);
 #ifdef CONFIG_SMP
 extern void wait_task_inactive(struct task_struct * p);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to