From c61e14d3a8412cd50d98aab604e607692c844c8a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 21:33:30 +0200 Subject: Adding upstream version 2.40. Signed-off-by: Daniel Baumann --- libblkid/src/superblocks/stratis.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libblkid/src/superblocks/stratis.c') diff --git a/libblkid/src/superblocks/stratis.c b/libblkid/src/superblocks/stratis.c index fe4a452..2651107 100644 --- a/libblkid/src/superblocks/stratis.c +++ b/libblkid/src/superblocks/stratis.c @@ -22,7 +22,7 @@ /* Macro to avoid error in struct declaration. */ #define STRATIS_UUID_LEN 32 /* Contains 4 hyphens and trailing null byte. */ -const int STRATIS_UUID_STR_LEN = 37; +#define STRATIS_UUID_STR_LEN 37 struct stratis_sb { uint32_t crc32; @@ -49,7 +49,7 @@ const char STRATIS_MAGIC[] = "!Stra0tis\x86\xff\x02^\x41rh"; #define MAGIC_OFFSET_COPY_1 (FIRST_COPY_OFFSET + _MAGIC_OFFSET) #define MAGIC_OFFSET_COPY_2 (SECOND_COPY_OFFSET + _MAGIC_OFFSET) -static int stratis_valid_sb(uint8_t *p) +static int stratis_valid_sb(const uint8_t *p) { const struct stratis_sb *stratis = (const struct stratis_sb *)p; uint32_t crc = 0; @@ -83,7 +83,7 @@ static int probe_stratis(blkid_probe pr, const struct blkid_idmag *mag __attribute__((__unused__))) { const struct stratis_sb *stratis = NULL; - uint8_t *buf = blkid_probe_get_buffer(pr, 0, SB_AREA_SIZE); + const uint8_t *buf = blkid_probe_get_buffer(pr, 0, SB_AREA_SIZE); unsigned char uuid[STRATIS_UUID_STR_LEN]; if (!buf) -- cgit v1.2.3