]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: cramfs: report endianness
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 26 Oct 2022 14:07:44 +0000 (16:07 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Wed, 26 Oct 2022 14:37:05 +0000 (16:37 +0200)
libblkid/src/superblocks/cramfs.c
tests/expected/blkid/low-probe-cramfs
tests/expected/blkid/low-probe-cramfs-big

index 39e12c1a76cc34c3072878f99188355174a67386..2a87acdaa1a95950e7aa25e706416064c064ce9e 100644 (file)
@@ -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;
 }
 
index ccab3d75ef1e68a0371012c9cc029505325516db..cf9c15237b69472a2166ab2ad2085b90f9100391 100644 (file)
@@ -1,3 +1,4 @@
+ID_FS_ENDIANNESS=LITTLE
 ID_FS_FSSIZE=4096
 ID_FS_LABEL=test-cram
 ID_FS_LABEL_ENC=test-cram
index f5f378fea99634b1fd2d05b87d441e25940f2fec..46d1295692ad9a89d70b02aeb8db91ac39719dae 100644 (file)
@@ -1,3 +1,4 @@
+ID_FS_ENDIANNESS=BIG
 ID_FS_FSSIZE=4096
 ID_FS_LABEL=Compressed
 ID_FS_LABEL_ENC=Compressed