Util-Linux Archive on lore.kernel.org
 help / 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	[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, back to index

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

Util-Linux Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/util-linux/0 util-linux/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 util-linux util-linux/ https://lore.kernel.org/util-linux \
		util-linux@vger.kernel.org util-linux@archiver.kernel.org
	public-inbox-index util-linux


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.util-linux


AGPL code for this site: git clone https://public-inbox.org/ public-inbox