From 1a8cc2bad92d7f1305d57aac3ee82e82117aab70 Mon Sep 17 00:00:00 2001 From: bz Date: Mon, 18 Jul 2011 20:06:15 +0000 Subject: Rename ki_ocomm to ki_tdname and OCOMMLEN to TDNAMLEN. Provide backward compatibility defines under BURN_BRIDGES. Suggested by: jhb Reviewed by: emaste Sponsored by: Sandvine Incorporated Approved by: re (kib) --- usr.bin/procstat/procstat_kstack.c | 6 +++--- usr.bin/procstat/procstat_threads.c | 6 +++--- usr.bin/top/machine.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/procstat/procstat_kstack.c b/usr.bin/procstat/procstat_kstack.c index fd2b9ab..d887262 100644 --- a/usr.bin/procstat/procstat_kstack.c +++ b/usr.bin/procstat/procstat_kstack.c @@ -213,9 +213,9 @@ procstat_kstack(struct kinfo_proc *kipp, int kflag) printf("%5d ", kipp->ki_pid); printf("%6d ", kkstp->kkst_tid); printf("%-16s ", kipp->ki_comm); - printf("%-16s ", (strlen(kipp->ki_ocomm) && - (strcmp(kipp->ki_comm, kipp->ki_ocomm) != 0)) ? - kipp->ki_ocomm : "-"); + printf("%-16s ", (strlen(kipp->ki_tdname) && + (strcmp(kipp->ki_comm, kipp->ki_tdname) != 0)) ? + kipp->ki_tdname : "-"); switch (kkstp->kkst_state) { case KKST_STATE_RUNNING: diff --git a/usr.bin/procstat/procstat_threads.c b/usr.bin/procstat/procstat_threads.c index 7633608..ffd659c 100644 --- a/usr.bin/procstat/procstat_threads.c +++ b/usr.bin/procstat/procstat_threads.c @@ -86,9 +86,9 @@ procstat_threads(struct kinfo_proc *kipp) printf("%6d ", kipp->ki_tid); printf("%-16s ", strlen(kipp->ki_comm) ? kipp->ki_comm : "-"); - printf("%-16s ", (strlen(kipp->ki_ocomm) && - (strcmp(kipp->ki_comm, kipp->ki_ocomm) != 0)) ? - kipp->ki_ocomm : "-"); + printf("%-16s ", (strlen(kipp->ki_tdname) && + (strcmp(kipp->ki_comm, kipp->ki_tdname) != 0)) ? + kipp->ki_tdname : "-"); if (kipp->ki_oncpu != 255) printf("%3d ", kipp->ki_oncpu); else if (kipp->ki_lastcpu != 255) diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 1f8a002..94feb9a 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -833,8 +833,8 @@ format_next_process(caddr_t handle, char *(*get_userid)(int), int flags) if (!(flags & FMT_SHOWARGS)) { if (ps.thread && pp->ki_flag & P_HADTHREADS && - pp->ki_ocomm[0]) { - snprintf(cmdbuf, cmdlengthdelta, "{%s}", pp->ki_ocomm); + pp->ki_tdname[0]) { + snprintf(cmdbuf, cmdlengthdelta, "{%s}", pp->ki_tdname); } else { snprintf(cmdbuf, cmdlengthdelta, "%s", pp->ki_comm); } @@ -844,9 +844,9 @@ format_next_process(caddr_t handle, char *(*get_userid)(int), int flags) (args = kvm_getargv(kd, pp, cmdlengthdelta)) == NULL || !(*args)) { if (ps.thread && pp->ki_flag & P_HADTHREADS && - pp->ki_ocomm[0]) { + pp->ki_tdname[0]) { snprintf(cmdbuf, cmdlengthdelta, - "{%s}", pp->ki_ocomm); + "{%s}", pp->ki_tdname); } else { snprintf(cmdbuf, cmdlengthdelta, "[%s]", pp->ki_comm); -- cgit v1.1