summaryrefslogtreecommitdiffstats
path: root/libblkid/src/superblocks/ddf_raid.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:34 +0000
commit1272be04be0cb803eec87f602edb2e3e6f111aea (patch)
treebce17f6478cdd9f3c4ec3d751135dc42786d6a56 /libblkid/src/superblocks/ddf_raid.c
parentReleasing progress-linux version 2.39.3-11~progress7.99u1. (diff)
downloadutil-linux-1272be04be0cb803eec87f602edb2e3e6f111aea.tar.xz
util-linux-1272be04be0cb803eec87f602edb2e3e6f111aea.zip
Merging upstream version 2.40.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libblkid/src/superblocks/ddf_raid.c')
-rw-r--r--libblkid/src/superblocks/ddf_raid.c6
1 files changed, 2 insertions, 4 deletions
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
};