From owner-freebsd-bugs@FreeBSD.ORG Mon Jul 11 23:20:09 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 695021065670 for ; Mon, 11 Jul 2011 23:20:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2E6308FC15 for ; Mon, 11 Jul 2011 23:20:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p6BNK9BC055439 for ; Mon, 11 Jul 2011 23:20:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p6BNK9IH055438; Mon, 11 Jul 2011 23:20:09 GMT (envelope-from gnats) Resent-Date: Mon, 11 Jul 2011 23:20:09 GMT Resent-Message-Id: <201107112320.p6BNK9IH055438@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alexander Best Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1294106566B for ; Mon, 11 Jul 2011 23:17:51 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id E1ECA8FC16 for ; Mon, 11 Jul 2011 23:17:51 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p6BNHpqn092273 for ; Mon, 11 Jul 2011 23:17:51 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p6BNHpJ4092272; Mon, 11 Jul 2011 23:17:51 GMT (envelope-from nobody) Message-Id: <201107112317.p6BNHpJ4092272@red.freebsd.org> Date: Mon, 11 Jul 2011 23:17:51 GMT From: Alexander Best To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/158819: [patch] improve top(1)'s message for the interactive 'C' option X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2011 23:20:09 -0000 >Number: 158819 >Category: bin >Synopsis: [patch] improve top(1)'s message for the interactive 'C' option >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jul 11 23:20:08 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Alexander Best >Release: 9.0-CURRENT >Organization: >Environment: FreeBSD otaku 9.0-CURRENT FreeBSD 9.0-CURRENT #23 r223911=11f0313-dirty: Mon Jul 11 00:20:49 CEST 2011 arundel@otaku:/usr/obj/usr/git-freebsd-head/sys/ARUNDEL amd64 >Description: when switching between weighted and raw cpu mode via the interactive 'C' key, top only displays the following messsage: "Displaying CPU" or "Displaying WCPU" that's not really a grand description, is it? the attached patch improves the message imho. >How-To-Repeat: apply the attached patch! >Fix: Patch attached with submission follows: diff --git a/contrib/top/top.c b/contrib/top/top.c index 4e4d86d..01c5946 100644 --- a/contrib/top/top.c +++ b/contrib/top/top.c @@ -1029,8 +1029,8 @@ restart: case CMD_wcputog: ps.wcpu = !ps.wcpu; new_message(MT_standout | MT_delayed, - " Displaying %sCPU", - ps.wcpu ? "W" : ""); + " Displaying %s CPU usage.", + ps.wcpu ? "weighted" : "raw"); header_text = format_header(uname_field); reset_display(); putchar('\r'); >Release-Note: >Audit-Trail: >Unformatted: