summaryrefslogtreecommitdiffstats
path: root/libblkid
diff options
context:
space:
mode:
authorTony Asleson2018-12-13 16:03:28 +0100
committerKarel Zak2018-12-17 10:16:11 +0100
commitae62a1751f01e47d5535339b31d7e327e1fe1126 (patch)
treeda0566edd5d4336929b10995bdaa2b18c9d962fc /libblkid
parentMerge branch 'aarch32_on_aarch64' of https://github.com/jlinton/util-linux (diff)
downloadkernel-qcow2-util-linux-ae62a1751f01e47d5535339b31d7e327e1fe1126.tar.gz
kernel-qcow2-util-linux-ae62a1751f01e47d5535339b31d7e327e1fe1126.tar.xz
kernel-qcow2-util-linux-ae62a1751f01e47d5535339b31d7e327e1fe1126.zip
libblkid: stratis: correct byte order
Stratis superblock is little endian, ensure we retrieve the number of sectors and initialization time correctly. Signed-off-by: Tony Asleson <tasleson@redhat.com>
Diffstat (limited to 'libblkid')
-rw-r--r--libblkid/src/superblocks/stratis.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libblkid/src/superblocks/stratis.c b/libblkid/src/superblocks/stratis.c
index 7fdee2b38..7a889b2d4 100644
--- a/libblkid/src/superblocks/stratis.c
+++ b/libblkid/src/superblocks/stratis.c
@@ -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;
}