From 6823fbf05537ca88716f403235cea5e7064ef9b1 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 10 Jan 2010 11:07:21 +0100 Subject: disk: also round when printing TB (Thanks Merovius) --- src/print_disk_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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) -- cgit v1.2.3