Commit Diff


commit - b78f9b30bbc757863bf813d8f3581ac53f800373
commit + 8a374bef6789587df7b98f8b6bf88ebfaaed7bc2
blob - d53820d6036b5d990419e85538106c0938838992
blob + fac65022d1119cc00b0bc15b37baaba55be1930f
--- Makefile
+++ Makefile
@@ -2,7 +2,7 @@
 # See LICENSE file for copyright and license details.
 .POSIX:
 
-VERSION = 0.1.4
+VERSION = 0.1.5
 PREFIX = /usr/local
 MANPREFIX = ${PREFIX}/man
 CFLAGS = -pipe -O2 -Wall -Werror
blob - 1dbbbdc4b299946d22d1769a5a3c6ce03f2bb22a
blob + 789cb65c34c33eacce9fa2cedf01326eb1bc43b0
--- lsblk.c
+++ lsblk.c
@@ -105,11 +105,11 @@ static void printsize (uint64_t sz)
     const unsigned scaled10 = sz * 10 / factor;
     const unsigned scaled = sz / factor;
     if (scaled10 >= 1000) {
-        printf (" %u", scaled);
+        printf ("%u", scaled);
     } else if (scaled10 >= 100) {
-        printf ("%u.%u", scaled, scaled10 % 10);
+        printf (" %u", scaled);
     } else {
-        printf (" %u.%u", scaled, scaled10 % 10);
+        printf ("%u.%u", scaled, scaled10 % 10);
     }
 
     putchar (sym);
@@ -172,11 +172,11 @@ int main (int argc, char *argv[])
         char *letter = name + strlen (name) - 1;
 
         printf ("%s    ", disk);
-        printsize ((((uint64_t)label.d_secperunith << 32) | label.d_secperunit) * ss);
+        printsize (DL_GETDSIZE (&label) * ss);
         printf (" %s\n", label.d_typename);
         for (uint16_t i = 0; i < label.d_npartitions; ++i) {
             const struct partition *p = &label.d_partitions[i];
-            const uint64_t size = (((uint64_t)p->p_sizeh << 32) | p->p_size) * ss;
+            const uint64_t size = DL_GETPSIZE (p) * ss;
             if (size == 0)
                 continue;