Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Aug 2006 09:10:20 GMT
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/101975: [PATCH] Adding percents in /usr/src/usr.bin/systat/pigs.c
Message-ID:  <200608140910.k7E9AKxC052377@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/101975; it has been noted by GNATS.

From: Giorgos Keramidas <keramida@ceid.upatras.gr>
To: Roberto Lima <roberto@forbrazil.com.br>
Cc: freebsd-gnats-submit@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@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
 %%%
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608140910.k7E9AKxC052377>