summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/ps/print.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c
index 1cbcf62..d8823ed 100644
--- a/bin/ps/print.c
+++ b/bin/ps/print.c
@@ -120,11 +120,12 @@ command(KINFO *k, VARENT *ve)
if (cflag) {
/* If it is the last field, then don't pad */
if (STAILQ_NEXT(ve, next_ve) == NULL) {
- asprintf(&str, "%s%s%s%s",
+ asprintf(&str, "%s%s%s%s%s",
k->ki_d.prefix ? k->ki_d.prefix : "",
k->ki_p->ki_comm,
(showthreads && k->ki_p->ki_numthreads > 1) ? "/" : "",
- (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_tdname : "");
+ (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_tdname : "",
+ (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_moretdname : "");
} else
str = strdup(k->ki_p->ki_comm);
@@ -172,14 +173,16 @@ ucomm(KINFO *k, VARENT *ve)
char *str;
if (STAILQ_NEXT(ve, next_ve) == NULL) { /* last field, don't pad */
- asprintf(&str, "%s%s%s%s",
+ asprintf(&str, "%s%s%s%s%s",
k->ki_d.prefix ? k->ki_d.prefix : "",
k->ki_p->ki_comm,
(showthreads && k->ki_p->ki_numthreads > 1) ? "/" : "",
- (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_tdname : "");
+ (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_tdname : "",
+ (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_moretdname : "");
} else {
if (showthreads && k->ki_p->ki_numthreads > 1)
- asprintf(&str, "%s/%s", k->ki_p->ki_comm, k->ki_p->ki_tdname);
+ asprintf(&str, "%s/%s%s", k->ki_p->ki_comm,
+ k->ki_p->ki_tdname, k->ki_p->ki_moretdname);
else
str = strdup(k->ki_p->ki_comm);
}
@@ -192,7 +195,8 @@ tdnam(KINFO *k, VARENT *ve __unused)
char *str;
if (showthreads && k->ki_p->ki_numthreads > 1)
- str = strdup(k->ki_p->ki_tdname);
+ asprintf(&str, "%s%s", k->ki_p->ki_tdname,
+ k->ki_p->ki_moretdname);
else
str = strdup(" ");
OpenPOWER on IntegriCloud