Replace ki_ocomm by ki_comm. The former will go away.

Submitted by:	Victor Cruceru <soc-victor>
Suggested by:   Julian Elischer
This commit is contained in:
Hartmut Brandt 2006-01-26 12:19:10 +00:00
parent 1de368e2f2
commit 4ecdfdcf91
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154860
2 changed files with 5 additions and 5 deletions

View File

@ -213,18 +213,18 @@ processor_get_pids(void)
if (!IS_KERNPROC(kp))
continue;
if (strcmp(kp->ki_ocomm, "idle") == 0) {
if (strcmp(kp->ki_comm, "idle") == 0) {
/* single processor system */
cpu = 0;
} else if (sscanf(kp->ki_ocomm, "idle: cpu%d%n", &cpu, &nchars)
== 1 && (u_int)nchars == strlen(kp->ki_ocomm)) {
} else if (sscanf(kp->ki_comm, "idle: cpu%d%n", &cpu, &nchars)
== 1 && (u_int)nchars == strlen(kp->ki_comm)) {
/* MP system */
} else
/* not an idle process */
continue;
HRDBG("'%s' proc with pid %d is on CPU #%d (last on #%d)",
kp->ki_ocomm, kp->ki_pid, kp->ki_oncpu, kp->ki_lastcpu);
kp->ki_comm, kp->ki_pid, kp->ki_oncpu, kp->ki_lastcpu);
TAILQ_FOREACH(entry, &processor_tbl, link)
if (entry->cpu_no == kp->ki_lastcpu)

View File

@ -200,7 +200,7 @@ kinfo_proc_to_swrun_entry(const struct kinfo_proc *kp,
char **argv = NULL;
uint64_t cpu_time = 0;
strlcpy((char*)entry->name, kp->ki_ocomm, sizeof(entry->name));
strlcpy((char*)entry->name, kp->ki_comm, sizeof(entry->name));
entry->id = oid_zeroDotZero; /* unknown id - FIXME */