disk: also round when printing TB (Thanks Merovius)

This commit is contained in:
Michael Stapelberg 2010-01-10 11:07:21 +01:00
parent ced822f461
commit 6823fbf055

View File

@ -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)