Mailinglist Archive: zypp-devel (66 mails)
| < Previous | Next > |
Re: [zypp-devel] Binary multiplication prefixes and zypp ByteCount
- From: Michael Andres <ma@xxxxxxx>
- Date: Tue, 10 Feb 2009 10:56:32 +0100
- Message-id: <200902101056.32911.ma@xxxxxxx>
On Monday 09 February 2009 15:10:32 Jan Kupec wrote:
Because it followes the convention used by commands like du/df.
Manual page df(1)
...
SIZE may be (or may be an integer optionally followed by) one of
following: kB 1000, K 1024, MB 1000*1000, M 1024*1024, and so
on for G, T, P, E, Z, Y.
That's why you can't simply append a 'B' to 'M' but need the 'i'
inbetween. From an intellctual POV it might appear right to write 'MiB'
instead of 'M', but I suppose most people are as well fine with a
simple 'M'. I actually don't mind, as long as the computed values are
correct, and ByteCount per default prints byte as unit.
If we do it, we should check sw_single dialogs (esp. ncurses) to make
shure the enlarged size fields don't get clipped.
--
cu,
Michael Andres
+------------------------------------------------------------------+
Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4
+------------------------------------------------------------------+
Michael Andres YaST Development ma@xxxxxxxxxx
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0
+------------------------------------------------------------------+
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
No please. The class is named ByteCount and that's why prints
per default "B" as unit. You should not change this semantic.
OK, but then why not adding the B also to the multiples (K -> KB, M ->
MB, ...). Currently it prints B for bytes (OK), but only M for megabytes
(i would expect MB).
Because it followes the convention used by commands like du/df.
Manual page df(1)
...
SIZE may be (or may be an integer optionally followed by) one of
following: kB 1000, K 1024, MB 1000*1000, M 1024*1024, and so
on for G, T, P, E, Z, Y.
That's why you can't simply append a 'B' to 'M' but need the 'i'
inbetween. From an intellctual POV it might appear right to write 'MiB'
instead of 'M', but I suppose most people are as well fine with a
simple 'M'. I actually don't mind, as long as the computed values are
correct, and ByteCount per default prints byte as unit.
If we do it, we should check sw_single dialogs (esp. ncurses) to make
shure the enlarged size fields don't get clipped.
--
cu,
Michael Andres
+------------------------------------------------------------------+
Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4
+------------------------------------------------------------------+
Michael Andres YaST Development ma@xxxxxxxxxx
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0
+------------------------------------------------------------------+
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
| < Previous | Next > |