From: Michael Stapelberg Date: Sun, 10 Jan 2010 10:07:21 +0000 (+0100) Subject: disk: also round when printing TB (Thanks Merovius) X-Git-Tag: 2.1~15 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6823fbf05537ca88716f403235cea5e7064ef9b1;p=i3%2Fi3status disk: also round when printing TB (Thanks Merovius) --- 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)