bin/101975: [PATCH] Adding percents in
/usr/src/usr.bin/systat/pigs.c
Giorgos Keramidas
keramida at ceid.upatras.gr
Mon Aug 14 09:10:21 UTC 2006
The following reply was made to PR bin/101975; it has been noted by GNATS.
From: Giorgos Keramidas <keramida at ceid.upatras.gr>
To: Roberto Lima <roberto at forbrazil.com.br>
Cc: freebsd-gnats-submit at freebsd.org
Subject: Re: bin/101975: [PATCH] Adding percents in /usr/src/usr.bin/systat/pigs.c
Date: Mon, 14 Aug 2006 03:45:22 +0300
On 2006-08-13 16:11, Roberto Lima <roberto at forbrazil.com.br> wrote:
> >Description:
> I see that systat -pigs don't shows percents in /0 ... /100, so
> I make this patch.
>
> >How-To-Repeat:
> # systat -pigs
>
> /0 /10 /20 /30 /40 /50 /60 /70 /80 /90 /100
> root idle: cpu0 XXXXXXXXXXXXXXX
>
> >Fix:
> --- /usr/src/usr.bin/systat/pigs.c.old Fri Jun 2 10:40:01 2006
> +++ /usr/src/usr.bin/systat/pigs.c Sun Aug 13 13:01:26 2006
> @@ -236,7 +236,7 @@
> wmove(wnd, 0, 0);
> wclrtoeol(wnd);
> mvwaddstr(wnd, 0, 20,
> - "/0 /10 /20 /30 /40 /50 /60 /70 /80 /90 /100");
> + "/0% /10% /20% /30% /40% /50% /60% /70% /80% /90% /100%");
> }
>
> int
> ---
Why? Isn't it obvious from the scale that this is a percentage?
Moreover, you have just broken the alignment of the "Load
Average" scale parts with the percentage stats.
You are "wasting space" by using 10 percent signs. Maybe we
can make it more obvious that 0/10/20/.../100 is a percentage
with a single '%' character as below (which also preserves
the current alignment of "Load average" and pigs columns?
%%%
Index: pigs.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/systat/pigs.c,v
retrieving revision 1.21
diff -u -r1.21 pigs.c
--- pigs.c 30 Apr 2006 04:26:46 -0000 1.21
+++ pigs.c 14 Aug 2006 00:40:06 -0000
@@ -236,7 +236,7 @@
wmove(wnd, 0, 0);
wclrtoeol(wnd);
mvwaddstr(wnd, 0, 20,
- "/0 /10 /20 /30 /40 /50 /60 /70 /80 /90 /100");
+ "/0 /10 /20 /30 /40 /50 /60 /70 /80 /90 /100%");
}
int
%%%
More information about the freebsd-bugs
mailing list