From owner-svn-src-head@FreeBSD.ORG Wed Oct 29 19:21:20 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD0B9E61; Wed, 29 Oct 2014 19:21:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9BA89AC; Wed, 29 Oct 2014 19:21:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9TJLKcN005879; Wed, 29 Oct 2014 19:21:20 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9TJLKpg005878; Wed, 29 Oct 2014 19:21:20 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201410291921.s9TJLKpg005878@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 29 Oct 2014 19:21:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273835 - head/usr.bin/top X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2014 19:21:20 -0000 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;