]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: stratis: correct byte order
authorTony Asleson <tasleson@redhat.com>
Thu, 13 Dec 2018 15:03:28 +0000 (09:03 -0600)
committerKarel Zak <kzak@redhat.com>
Fri, 4 Jan 2019 10:46:43 +0000 (11:46 +0100)
Stratis superblock is little endian, ensure we retrieve the
number of sectors and initialization time correctly.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
libblkid/src/superblocks/stratis.c

index 7fdee2b38c03be2acb886924ca18b002fe273c44..7a889b2d4c8fcafe4483ebb572058e854f38af37 100644 (file)
@@ -83,9 +83,9 @@ static int probe_stratis(blkid_probe pr,
                                sizeof(stratis->pool_uuid));
 
        blkid_probe_sprintf_value(pr, "BLOCKDEV_SECTORS", "%" PRIu64,
-                                       stratis->sectors);
+                               le64_to_cpu(stratis->sectors));
        blkid_probe_sprintf_value(pr, "BLOCKDEV_INITTIME", "%" PRIu64,
-                                       stratis->initialization_time);
+                               le64_to_cpu(stratis->initialization_time));
 
        return 0;
 }