diff options
Diffstat (limited to 'procps')
-rw-r--r-- | procps/ps.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/procps/ps.c b/procps/ps.c index c3023cf5e..fd53eca5b 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
@@ -68,7 +68,10 @@ static void func_rss(char *buf, int size, const procps_status_t *ps) | |||
68 | 68 | ||
69 | static void func_tty(char *buf, int size, const procps_status_t *ps) | 69 | static void func_tty(char *buf, int size, const procps_status_t *ps) |
70 | { | 70 | { |
71 | safe_strncpy(buf, ps->tty_str, size+1); | 71 | buf[0] = '?'; |
72 | buf[1] = '\0'; | ||
73 | if (ps->tty_major) /* tty field of "0" means "no tty" */ | ||
74 | snprintf(buf, size+1, "%u,%u", ps->tty_major, ps->tty_minor); | ||
72 | } | 75 | } |
73 | 76 | ||
74 | #if ENABLE_SELINUX | 77 | #if ENABLE_SELINUX |