[PATCH] libblkid: stratis: correct byte order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stratis superblock is little endian, ensure we retrieve the
number of sectors and initialization time correctly.

Signed-off-by: Tony Asleson <tasleson@xxxxxxxxxx>
---
 libblkid/src/superblocks/stratis.c | 4 ++--
 1 file 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;
 }
-- 
2.17.2




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux