From: Thomas Weißschuh Date: Wed, 26 Oct 2022 14:07:44 +0000 (+0200) Subject: libblkid: cramfs: report endianness X-Git-Tag: v2.39-rc1~453^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4129676ca65da89d73fd62c900dc13f35f4512a2;p=thirdparty%2Futil-linux.git libblkid: cramfs: report endianness --- diff --git a/libblkid/src/superblocks/cramfs.c b/libblkid/src/superblocks/cramfs.c index 39e12c1a76..2a87acdaa1 100644 --- a/libblkid/src/superblocks/cramfs.c +++ b/libblkid/src/superblocks/cramfs.c @@ -91,6 +91,8 @@ static int probe_cramfs(blkid_probe pr, const struct blkid_idmag *mag) blkid_probe_set_label(pr, cs->name, sizeof(cs->name)); blkid_probe_set_fssize(pr, cfs32_to_cpu(le, cs->size)); blkid_probe_sprintf_version(pr, "%d", v2 ? 2 : 1); + blkid_probe_set_fsendianness(pr, + le ? BLKID_ENDIANNESS_LITTLE : BLKID_ENDIANNESS_BIG); return 0; } diff --git a/tests/expected/blkid/low-probe-cramfs b/tests/expected/blkid/low-probe-cramfs index ccab3d75ef..cf9c15237b 100644 --- a/tests/expected/blkid/low-probe-cramfs +++ b/tests/expected/blkid/low-probe-cramfs @@ -1,3 +1,4 @@ +ID_FS_ENDIANNESS=LITTLE ID_FS_FSSIZE=4096 ID_FS_LABEL=test-cram ID_FS_LABEL_ENC=test-cram diff --git a/tests/expected/blkid/low-probe-cramfs-big b/tests/expected/blkid/low-probe-cramfs-big index f5f378fea9..46d1295692 100644 --- a/tests/expected/blkid/low-probe-cramfs-big +++ b/tests/expected/blkid/low-probe-cramfs-big @@ -1,3 +1,4 @@ +ID_FS_ENDIANNESS=BIG ID_FS_FSSIZE=4096 ID_FS_LABEL=Compressed ID_FS_LABEL_ENC=Compressed