From: Jiri Denemark Date: Thu, 14 Feb 2013 13:45:48 +0000 (+0100) Subject: virsh: Always print capacity unit X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ada9e157a2990b865d113f4eb77ad8db5835f68b;p=libvirt.git 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 :-) --- diff --git a/tools/virsh.c b/tools/virsh.c index f5a01b3d5b..d64e539660 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -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";