diff options
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r-- | fs/proc/array.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index 851ec0915e4c..ae2c807fd719 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
@@ -174,7 +174,8 @@ static inline void task_state(struct seq_file *m, struct pid_namespace *ns, | |||
174 | 174 | ||
175 | if (umask >= 0) | 175 | if (umask >= 0) |
176 | seq_printf(m, "Umask:\t%#04o\n", umask); | 176 | seq_printf(m, "Umask:\t%#04o\n", umask); |
177 | seq_printf(m, "State:\t%s", get_task_state(p)); | 177 | seq_puts(m, "State:\t"); |
178 | seq_puts(m, get_task_state(p)); | ||
178 | 179 | ||
179 | seq_put_decimal_ull(m, "\nTgid:\t", tgid); | 180 | seq_put_decimal_ull(m, "\nTgid:\t", tgid); |
180 | seq_put_decimal_ull(m, "\nNgid:\t", ngid); | 181 | seq_put_decimal_ull(m, "\nNgid:\t", ngid); |
@@ -300,8 +301,8 @@ static void render_cap_t(struct seq_file *m, const char *header, | |||
300 | 301 | ||
301 | seq_puts(m, header); | 302 | seq_puts(m, header); |
302 | CAP_FOR_EACH_U32(__capi) { | 303 | CAP_FOR_EACH_U32(__capi) { |
303 | seq_printf(m, "%08x", | 304 | seq_put_hex_ll(m, NULL, |
304 | a->cap[CAP_LAST_U32 - __capi]); | 305 | a->cap[CAP_LAST_U32 - __capi], 8); |
305 | } | 306 | } |
306 | seq_putc(m, '\n'); | 307 | seq_putc(m, '\n'); |
307 | } | 308 | } |
@@ -355,7 +356,8 @@ static void task_cpus_allowed(struct seq_file *m, struct task_struct *task) | |||
355 | 356 | ||
356 | static inline void task_core_dumping(struct seq_file *m, struct mm_struct *mm) | 357 | static inline void task_core_dumping(struct seq_file *m, struct mm_struct *mm) |
357 | { | 358 | { |
358 | seq_printf(m, "CoreDumping:\t%d\n", !!mm->core_state); | 359 | seq_put_decimal_ull(m, "CoreDumping:\t", !!mm->core_state); |
360 | seq_putc(m, '\n'); | ||
359 | } | 361 | } |
360 | 362 | ||
361 | int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, | 363 | int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, |
@@ -491,7 +493,11 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, | |||
491 | /* convert nsec -> ticks */ | 493 | /* convert nsec -> ticks */ |
492 | start_time = nsec_to_clock_t(task->real_start_time); | 494 | start_time = nsec_to_clock_t(task->real_start_time); |
493 | 495 | ||
494 | seq_printf(m, "%d (%s) %c", pid_nr_ns(pid, ns), tcomm, state); | 496 | seq_put_decimal_ull(m, "", pid_nr_ns(pid, ns)); |
497 | seq_puts(m, " ("); | ||
498 | seq_puts(m, tcomm); | ||
499 | seq_puts(m, ") "); | ||
500 | seq_putc(m, state); | ||
495 | seq_put_decimal_ll(m, " ", ppid); | 501 | seq_put_decimal_ll(m, " ", ppid); |
496 | seq_put_decimal_ll(m, " ", pgid); | 502 | seq_put_decimal_ll(m, " ", pgid); |
497 | seq_put_decimal_ll(m, " ", sid); | 503 | seq_put_decimal_ll(m, " ", sid); |