Re: [PATCH 1/1] ip-link: allow human readable output with base of 1024 only for byte counts
From: Christian Hesse <hidden>
Date: 2015-03-30 07:11:43
Attachments
- (unnamed) [application/pgp-signature] 473 bytes
From: Christian Hesse <hidden>
Date: 2015-03-30 07:11:43
Stephen Hemminger [off-list ref] on Sun, 2015/03/29 22:58:
On Thu, 26 Mar 2015 12:24:08 +0100 Christian Hesse [off-list ref] wrote:quoted
From: Christian Hesse <redacted> Counting bytes with a base of 1024 is ok. Counting packets, errors, etc that way makes no sense. So only print byte counts with a base of 1024 if option -iec is given. Signed-off-by: Christian Hesse <redacted>This changes the output which users expect, especially the packet counts should follow existing practice. And I doubt anyone would have 1024 errors.
With current code you can give -iec and everything (including errors) is
printed with IEC units. This patch changes it to only print byte counts with
IEC units, so error will be displayed with a base of 1000 always.
I think my patch changes things to what user expects, no?
--
main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/* Chris get my mail address: */=0;b=c[a++];)
putchar(b-1/(/* gcc -o sig sig.c && ./sig */b/42*2-3)*42);}