mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
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
2 changed files with 5 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue