]> git.sur5r.net Git - i3/i3status/commitdiff
disk: also round when printing TB (Thanks Merovius)
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 10 Jan 2010 10:07:21 +0000 (11:07 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 10 Jan 2010 10:07:21 +0000 (11:07 +0100)
src/print_disk_info.c

index 11111db0a7de2801c557c67e8098158df9ed3ad0..3bd2bf861f157f4e673ed6d0155b874cf418aaad 100644 (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)