diff options
author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2011-07-18 20:06:15 +0000 |
---|---|---|
committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2011-07-18 20:06:15 +0000 |
commit | 925af54487d1c8cafc0dbb5ceee2ed1e49285249 (patch) | |
tree | 89c30228db716dd5aea7753adbe51af32a2e45bf /bin | |
parent | 8953ac43348a6f1931df7a0f876b130f27a4fae9 (diff) | |
download | src-925af54487d1c8cafc0dbb5ceee2ed1e49285249.tar.gz src-925af54487d1c8cafc0dbb5ceee2ed1e49285249.zip |
Notes
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ps/keyword.c | 4 | ||||
-rw-r--r-- | bin/ps/print.c | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index c4467561bf38..7dbaa4fe74cf 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -82,7 +82,7 @@ static VAR var[] = { {"class", "CLASS", NULL, LJUST, loginclass, s_loginclass, MAXLOGNAME-1, 0, CHAR, NULL, 0}, {"comm", "COMMAND", NULL, LJUST, ucomm, s_comm, - COMMLEN + OCOMMLEN + 1, 0, CHAR, NULL, 0}, + COMMLEN + TDNAMLEN + 1, 0, CHAR, NULL, 0}, {"command", "COMMAND", NULL, COMM|LJUST|USER, command, NULL, 16, 0, CHAR, NULL, 0}, {"cpu", "CPU", NULL, 0, kvar, NULL, 3, KOFF(ki_estcpu), UINT, "d", @@ -212,7 +212,7 @@ static VAR var[] = { {"tt", "TT ", NULL, 0, tname, NULL, 4, 0, CHAR, NULL, 0}, {"tty", "TTY", NULL, LJUST, longtname, NULL, 8, 0, CHAR, NULL, 0}, {"ucomm", "UCOMM", NULL, LJUST, ucomm, s_comm, - COMMLEN + OCOMMLEN + 1, 0, CHAR, NULL, 0}, + COMMLEN + TDNAMLEN + 1, 0, CHAR, NULL, 0}, {"uid", "UID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_uid), UINT, UIDFMT, 0}, {"upr", "UPR", NULL, 0, upr, NULL, 3, 0, CHAR, NULL, 0}, diff --git a/bin/ps/print.c b/bin/ps/print.c index 02c6112d5461..7d1d1902b9b3 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -136,7 +136,7 @@ command(KINFO *k, VARENT *ve) (void)printf("%s", k->ki_d.prefix); (void)printf("%s", k->ki_p->ki_comm); if (showthreads && k->ki_p->ki_numthreads > 1) - (void)printf("/%s", k->ki_p->ki_ocomm); + (void)printf("/%s", k->ki_p->ki_tdname); } else (void)printf("%-*s", v->width, k->ki_p->ki_comm); return; @@ -190,7 +190,7 @@ command(KINFO *k, VARENT *ve) void ucomm(KINFO *k, VARENT *ve) { - char tmpbuff[COMMLEN + OCOMMLEN + 2]; + char tmpbuff[COMMLEN + TDNAMLEN + 2]; VAR *v; v = ve->var; @@ -199,12 +199,12 @@ ucomm(KINFO *k, VARENT *ve) (void)printf("%s", k->ki_d.prefix); (void)printf("%s", k->ki_p->ki_comm); if (showthreads && k->ki_p->ki_numthreads > 1) - printf("/%s", k->ki_p->ki_ocomm); + printf("/%s", k->ki_p->ki_tdname); } else { bzero(tmpbuff, sizeof(tmpbuff)); if (showthreads && k->ki_p->ki_numthreads > 1) sprintf(tmpbuff, "%s/%s", k->ki_p->ki_comm, - k->ki_p->ki_ocomm); + k->ki_p->ki_tdname); else sprintf(tmpbuff, "%s", k->ki_p->ki_comm); (void)printf("%-*s", v->width, tmpbuff); @@ -218,7 +218,7 @@ tdnam(KINFO *k, VARENT *ve) v = ve->var; if (showthreads && k->ki_p->ki_numthreads > 1) - (void)printf("%-*s", v->width, k->ki_p->ki_ocomm); + (void)printf("%-*s", v->width, k->ki_p->ki_tdname); else (void)printf("%-*s", v->width, " "); } @@ -943,12 +943,12 @@ loginclass(KINFO *k, VARENT *ve) int s_comm(KINFO *k) { - char tmpbuff[COMMLEN + OCOMMLEN + 2]; + char tmpbuff[COMMLEN + TDNAMLEN + 2]; bzero(tmpbuff, sizeof(tmpbuff)); if (showthreads && k->ki_p->ki_numthreads > 1) sprintf(tmpbuff, "%s/%s", k->ki_p->ki_comm, - k->ki_p->ki_ocomm); + k->ki_p->ki_tdname); else sprintf(tmpbuff, "%s", k->ki_p->ki_comm); return (strlen(tmpbuff)); |