summaryrefslogtreecommitdiffstats
path: root/libblkid/src/superblocks/xfs.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:32 +0000
commit8bb05ac73a5b448b339ce0bc8d396c82c459b47f (patch)
tree1fdda006866bca20d41cb206767ea5241e36852f /libblkid/src/superblocks/xfs.c
parentAdding debian version 2.39.3-11. (diff)
downloadutil-linux-8bb05ac73a5b448b339ce0bc8d396c82c459b47f.tar.xz
util-linux-8bb05ac73a5b448b339ce0bc8d396c82c459b47f.zip
Merging upstream version 2.40.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libblkid/src/superblocks/xfs.c')
-rw-r--r--libblkid/src/superblocks/xfs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libblkid/src/superblocks/xfs.c b/libblkid/src/superblocks/xfs.c
index f0e099e..0c35982 100644
--- a/libblkid/src/superblocks/xfs.c
+++ b/libblkid/src/superblocks/xfs.c
@@ -111,7 +111,7 @@ struct xfs_super_block {
#define XFS_SB_VERSION2_CRCBIT 0x00000100
-static void sb_from_disk(struct xfs_super_block *from,
+static void sb_from_disk(const struct xfs_super_block *from,
struct xfs_super_block *to)
{
@@ -170,7 +170,7 @@ static void sb_from_disk(struct xfs_super_block *from,
to->sb_rrmapino = be64_to_cpu(from->sb_rrmapino);
}
-static int xfs_verify_sb(struct xfs_super_block *ondisk, blkid_probe pr,
+static int xfs_verify_sb(const struct xfs_super_block *ondisk, blkid_probe pr,
const struct blkid_idmag *mag)
{
struct xfs_super_block sb, *sbp = &sb;
@@ -206,7 +206,7 @@ static int xfs_verify_sb(struct xfs_super_block *ondisk, blkid_probe pr,
if ((sbp->sb_versionnum & 0x0f) == 5) {
uint32_t expected, crc;
- unsigned char *csummed;
+ const unsigned char *csummed;
if (!(sbp->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT))
return 0;
@@ -230,7 +230,7 @@ static int xfs_verify_sb(struct xfs_super_block *ondisk, blkid_probe pr,
return 1;
}
-static uint64_t xfs_fssize(struct xfs_super_block *xs)
+static uint64_t xfs_fssize(const struct xfs_super_block *xs)
{
uint32_t lsize = xs->sb_logstart ? xs->sb_logblocks : 0;
uint64_t avail_blocks = be64_to_cpu(xs->sb_dblocks) - be32_to_cpu(lsize);
@@ -241,7 +241,7 @@ static uint64_t xfs_fssize(struct xfs_super_block *xs)
static int probe_xfs(blkid_probe pr, const struct blkid_idmag *mag)
{
- struct xfs_super_block *xs;
+ const struct xfs_super_block *xs;
xs = blkid_probe_get_sb(pr, mag, struct xfs_super_block);
if (!xs)
@@ -331,7 +331,7 @@ static int probe_xfs_log(blkid_probe pr,
{
int i;
struct xlog_rec_header *rhead;
- unsigned char *buf;
+ const unsigned char *buf;
buf = blkid_probe_get_buffer(pr, 0, 256*1024);
if (!buf)