Replace a magic number with the proper definition. This change actually
fixes broken state field after r273266, i.e., "CPU-1" was displayed in place of "RUN".
This commit is contained in:
parent
079e563cae
commit
b666b03241
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=273835
@ -941,7 +941,7 @@ format_next_process(caddr_t handle, char *(*get_userid)(int), int flags)
|
|||||||
/* generate "STATE" field */
|
/* generate "STATE" field */
|
||||||
switch (state = pp->ki_stat) {
|
switch (state = pp->ki_stat) {
|
||||||
case SRUN:
|
case SRUN:
|
||||||
if (smpmode && pp->ki_oncpu != 0xff)
|
if (smpmode && pp->ki_oncpu != NOCPU)
|
||||||
sprintf(status, "CPU%d", pp->ki_oncpu);
|
sprintf(status, "CPU%d", pp->ki_oncpu);
|
||||||
else
|
else
|
||||||
strcpy(status, "RUN");
|
strcpy(status, "RUN");
|
||||||
@ -1100,7 +1100,7 @@ format_next_process(caddr_t handle, char *(*get_userid)(int), int flags)
|
|||||||
|
|
||||||
/* format this entry */
|
/* format this entry */
|
||||||
if (smpmode) {
|
if (smpmode) {
|
||||||
if (state == SRUN && pp->ki_oncpu != 0xff)
|
if (state == SRUN && pp->ki_oncpu != NOCPU)
|
||||||
cpu = pp->ki_oncpu;
|
cpu = pp->ki_oncpu;
|
||||||
else
|
else
|
||||||
cpu = pp->ki_lastcpu;
|
cpu = pp->ki_lastcpu;
|
||||||
|
Loading…
Reference in New Issue
Block a user