virsh: Always print capacity unit

It doesn't make sense to print the unit (B) only with Ki, Mi, ...
prefixes. Even those poor bytes under 1 KiB are still bytes :-)
This commit is contained in:
Jiri Denemark 2013-02-14 14:45:48 +01:00
parent e086deda3c
commit ada9e157a2

View File

@ -148,7 +148,7 @@ double
vshPrettyCapacity(unsigned long long val, const char **unit)
{
if (val < 1024) {
*unit = "";
*unit = "B";
return (double)val;
} else if (val < (1024.0l * 1024.0l)) {
*unit = "KiB";