Mailinglist Archive: zypp-devel (66 mails)

< Previous Next >
Re: [zypp-devel] Binary multiplication prefixes and zypp ByteCount
  • From: Jan Kupec <jkupec@xxxxxxx>
  • Date: Mon, 09 Feb 2009 15:10:32 +0100
  • Message-id: <49903958.5090200@xxxxxxx>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Andres wrote:
On Thursday 05 February 2009 16:02:23 Jan Kupec wrote:
What about the attached diff to ByteCount.cc as part of fixing
https://bugzilla.novell.com/show_bug.cgi?id=471335 ?

Note the empty 'symbol' for Byte - this way users can just do:

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).

Feel free to enhance the class to support different units like 'bit', but

E.g. by allowing the class to set the unit name and append that name to
the K/M prefix (and use B as the default)?

don't change the default behaviour.

ok

- --
cheers,
jano


Ján Kupec
YaST team
- ---------------------------------------------------------(PGP)---
Key ID: 637EE901
Fingerprint: 93B9 C79B 2D20 51C3 800B E09B 8048 46A6 637E E901
- ---------------------------------------------------------(IRC)---
Server: irc.freenode.net
Nick: jniq
Channels: #zypp #yast #suse #susecz
- ---------------------------------------------------------(EOF)---
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iEYEARECAAYFAkmQOVgACgkQgEhGpmN+6QEYEwCfdvkHwJT29fCl6lwCYhaIK4t2
haEAn26MFZOZlCgBQSvSETeErT+9azCA
=tNEe
-----END PGP SIGNATURE-----
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups