Hah, great catch! Thanks!
-adrian On 29 October 2014 12:21, Jung-uk Kim <j...@freebsd.org> wrote: > Author: jkim > Date: Wed Oct 29 19:21:19 2014 > New Revision: 273835 > URL: https://svnweb.freebsd.org/changeset/base/273835 > > Log: > 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". > > Modified: > head/usr.bin/top/machine.c > > Modified: head/usr.bin/top/machine.c > ============================================================================== > --- head/usr.bin/top/machine.c Wed Oct 29 18:01:09 2014 (r273834) > +++ head/usr.bin/top/machine.c Wed Oct 29 19:21:19 2014 (r273835) > @@ -941,7 +941,7 @@ format_next_process(caddr_t handle, char > /* generate "STATE" field */ > switch (state = pp->ki_stat) { > case SRUN: > - if (smpmode && pp->ki_oncpu != 0xff) > + if (smpmode && pp->ki_oncpu != NOCPU) > sprintf(status, "CPU%d", pp->ki_oncpu); > else > strcpy(status, "RUN"); > @@ -1100,7 +1100,7 @@ format_next_process(caddr_t handle, char > > /* format this entry */ > if (smpmode) { > - if (state == SRUN && pp->ki_oncpu != 0xff) > + if (state == SRUN && pp->ki_oncpu != NOCPU) > cpu = pp->ki_oncpu; > else > cpu = pp->ki_lastcpu; > _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"