From 8bb05ac73a5b448b339ce0bc8d396c82c459b47f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 21:33:32 +0200 Subject: Merging upstream version 2.40. Signed-off-by: Daniel Baumann --- libblkid/src/superblocks/ddf_raid.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libblkid/src/superblocks/ddf_raid.c') diff --git a/libblkid/src/superblocks/ddf_raid.c b/libblkid/src/superblocks/ddf_raid.c index 0b82e73..a7cf32c 100644 --- a/libblkid/src/superblocks/ddf_raid.c +++ b/libblkid/src/superblocks/ddf_raid.c @@ -80,9 +80,6 @@ static int probe_ddf(blkid_probe pr, char version[DDF_REV_LENGTH + 1]; uint64_t off = 0, lba; - if (pr->size < 0x30000) - return 1; - for (i = 0; i < ARRAY_SIZE(hdrs); i++) { off = ((pr->size / 0x200) - hdrs[i]) * 0x200; @@ -106,7 +103,7 @@ static int probe_ddf(blkid_probe pr, if (lba > 0) { /* check primary header */ - unsigned char *buf; + const unsigned char *buf; buf = blkid_probe_get_buffer(pr, lba << 9, sizeof(ddf->signature)); @@ -134,6 +131,7 @@ static int probe_ddf(blkid_probe pr, const struct blkid_idinfo ddfraid_idinfo = { .name = "ddf_raid_member", .usage = BLKID_USAGE_RAID, + .minsz = 0x30000, .probefunc = probe_ddf, .magics = BLKID_NONE_MAGIC }; -- cgit v1.2.3