From 2f0eb081ffb7735006dd5641360c1dcfdbcc4cc4 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 15 Dec 2009 11:55:27 +0100 Subject: [PATCH] libblkid: fix highpoint37x detection Signed-off-by: Karel Zak --- shlibs/blkid/src/superblocks/highpoint_raid.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/shlibs/blkid/src/superblocks/highpoint_raid.c b/shlibs/blkid/src/superblocks/highpoint_raid.c index 4b4b8511..0d948462 100644 --- a/shlibs/blkid/src/superblocks/highpoint_raid.c +++ b/shlibs/blkid/src/superblocks/highpoint_raid.c @@ -55,8 +55,15 @@ const struct blkid_idinfo highpoint37x_idinfo = { .name = "highpoint_raid_member", .usage = BLKID_USAGE_RAID, .magics = { - { .magic = "\xf0\x16\x78\x5a", .len = 4, .kboff = 4 }, - { .magic = "\xfd\x16\x78\x5a", .len = 4, .kboff = 4 }, + /* + * Superblok offset: 4608 bytes (9 sectors) + * Magic string offset within superblock: 32 bytes + * + * kboff = (4608 + 32) / 1024 + * sboff = (4608 + 32) % kboff + */ + { .magic = "\xf0\x16\x78\x5a", .len = 4, .kboff = 4, .sboff = 544 }, + { .magic = "\xfd\x16\x78\x5a", .len = 4, .kboff = 4, .sboff = 544 }, { NULL } } }; -- 2.39.5