summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2010-01-10 11:07:21 +0100
committerMichael Stapelberg <michael@stapelberg.de>2010-01-10 11:07:21 +0100
commit6823fbf05537ca88716f403235cea5e7064ef9b1 (patch)
tree626c09002264daa9f7b36ad8d7dc713a01bf9a87
parentced822f4611b7c3f6df49cae188ab05aa65ab0d6 (diff)
disk: also round when printing TB (Thanks Merovius)
-rw-r--r--src/print_disk_info.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/print_disk_info.c b/src/print_disk_info.c
index 11111db..3bd2bf8 100644
--- a/src/print_disk_info.c
+++ b/src/print_disk_info.c
@@ -20,7 +20,7 @@
*/
static void print_bytes_human(uint64_t bytes) {
if (bytes > TERABYTE)
- printf("%f TB", (double)bytes / TERABYTE);
+ printf("%.02f TB", (double)bytes / TERABYTE);
else if (bytes > GIGABYTE)
printf("%.01f GB", (double)bytes / GIGABYTE);
else if (bytes > MEGABYTE)