Date: Mon, 11 Jul 2011 23:17:51 GMT From: Alexander Best <arundel@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/158819: [patch] improve top(1)'s message for the interactive 'C' option Message-ID: <201107112317.p6BNHpJ4092272@red.freebsd.org> Resent-Message-ID: <201107112320.p6BNK9IH055438@freefall.freebsd.org>
index | next in thread | raw e-mail
>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:
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107112317.p6BNHpJ4092272>
