]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: (xfs) fix sector size calculation
authorKarel Zak <kzak@redhat.com>
Tue, 3 Sep 2019 13:10:35 +0000 (15:10 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 3 Sep 2019 13:10:35 +0000 (15:10 +0200)
Reported-by: Anatoly Pugachev <matorola@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/superblocks/xfs.c

index eb513ac3ec201e91776f8610c45d9cc5193b8f7e..98e59ff7c764ec6caee6bd79f54962b10862c204 100644 (file)
@@ -173,7 +173,7 @@ static int probe_xfs(blkid_probe pr, const struct blkid_idmag *mag)
                blkid_probe_set_label(pr, (unsigned char *) xs->sb_fname,
                                sizeof(xs->sb_fname));
        blkid_probe_set_uuid(pr, xs->sb_uuid);
-       blkid_probe_set_block_size(pr, xs->sb_sectsize * 256);
+       blkid_probe_set_block_size(pr, be16_to_cpu(xs->sb_sectsize));
        return 0;
 }