On Tue, Feb 10, 2009 at 7:56 PM, Michael Andres
On Monday 09 February 2009 15:10:32 Jan Kupec wrote:
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.
Interesting. Never knew up that the single letter convention notation was designed to be explicit like that . All of this is really making the decimal (kB, MB etc.) system a little unusable, as there's just no way of knowing which convention they're following. And it is really getting exploited, like my ISP (optus) who actually use both (metric for quotas and decimal for download size, funny huh). Even the 8GB flash drive I bought is only 7.6GiB.
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.
I like the 'MiB' because it's easier to look-up and more common. I remember the first time I stumbled upon MiB. I googled it -- and I've been enlightened ever since. While if it was just an 'M' I'd have assumed it was someone being lazy and far far more difficult to look up.
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@novell.com 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@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
-- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org