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:
parent
1de368e2f2
commit
4ecdfdcf91
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154860
@ -213,18 +213,18 @@ processor_get_pids(void)
|
|||||||
if (!IS_KERNPROC(kp))
|
if (!IS_KERNPROC(kp))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (strcmp(kp->ki_ocomm, "idle") == 0) {
|
if (strcmp(kp->ki_comm, "idle") == 0) {
|
||||||
/* single processor system */
|
/* single processor system */
|
||||||
cpu = 0;
|
cpu = 0;
|
||||||
} else if (sscanf(kp->ki_ocomm, "idle: cpu%d%n", &cpu, &nchars)
|
} else if (sscanf(kp->ki_comm, "idle: cpu%d%n", &cpu, &nchars)
|
||||||
== 1 && (u_int)nchars == strlen(kp->ki_ocomm)) {
|
== 1 && (u_int)nchars == strlen(kp->ki_comm)) {
|
||||||
/* MP system */
|
/* MP system */
|
||||||
} else
|
} else
|
||||||
/* not an idle process */
|
/* not an idle process */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
HRDBG("'%s' proc with pid %d is on CPU #%d (last on #%d)",
|
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)
|
TAILQ_FOREACH(entry, &processor_tbl, link)
|
||||||
if (entry->cpu_no == kp->ki_lastcpu)
|
if (entry->cpu_no == kp->ki_lastcpu)
|
||||||
|
@ -200,7 +200,7 @@ kinfo_proc_to_swrun_entry(const struct kinfo_proc *kp,
|
|||||||
char **argv = NULL;
|
char **argv = NULL;
|
||||||
uint64_t cpu_time = 0;
|
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 */
|
entry->id = oid_zeroDotZero; /* unknown id - FIXME */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user