util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libblkid: stratis: correct byte order
@ 2018-12-13 15:03 Tony Asleson
  2018-12-17  9:46 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Tony Asleson @ 2018-12-13 15:03 UTC (permalink / raw)
  To: util-linux

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 | 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] libblkid: stratis: correct byte order
  2018-12-13 15:03 [PATCH] libblkid: stratis: correct byte order Tony Asleson
@ 2018-12-17  9:46 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2018-12-17  9:46 UTC (permalink / raw)
  To: Tony Asleson; +Cc: util-linux

On Thu, Dec 13, 2018 at 09:03:28AM -0600, Tony Asleson wrote:
>  libblkid/src/superblocks/stratis.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-17  9:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-13 15:03 [PATCH] libblkid: stratis: correct byte order Tony Asleson
2018-12-17  9:46 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).