From f19f9872a011d9f4f527332ffb855d6edf66611c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 21 Nov 2008 12:37:01 +0100 Subject: [PATCH] blkid: add lvm1 Signed-off-by: Karel Zak --- libs/blkid/src/probe.c | 2 +- libs/blkid/src/probers/lvm.c | 14 ++++++++++++-- libs/blkid/src/probers/probers.h | 1 + 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/libs/blkid/src/probe.c b/libs/blkid/src/probe.c index 7324be9f..34d2e808 100644 --- a/libs/blkid/src/probe.c +++ b/libs/blkid/src/probe.c @@ -50,7 +50,7 @@ static const struct blkid_idinfo *idinfos[] = &adraid_idinfo, &jmraid_idinfo, &lvm2_idinfo, - /* TODO: lvm1 */ + &lvm1_idinfo, &luks_idinfo, /* Filesystems */ diff --git a/libs/blkid/src/probers/lvm.c b/libs/blkid/src/probers/lvm.c index e02f9048..3dea6d9e 100644 --- a/libs/blkid/src/probers/lvm.c +++ b/libs/blkid/src/probers/lvm.c @@ -115,8 +115,7 @@ static int probe_lvm2(blkid_probe pr, const struct blkid_idmag *mag) } -/* NOTE: libblkid uses "lvm2pv" as a name */ - +/* NOTE: the original libblkid uses "lvm2pv" as a name */ const struct blkid_idinfo lvm2_idinfo = { .name = "LVM2_member", @@ -132,4 +131,15 @@ const struct blkid_idinfo lvm2_idinfo = } }; +const struct blkid_idinfo lvm1_idinfo = +{ + .name = "LVM1_member", + .usage = BLKID_USAGE_RAID, + .magics = + { + { .magic = "HM", .len = 2, .sboff = 0x400 }, + { NULL } + } +}; + diff --git a/libs/blkid/src/probers/probers.h b/libs/blkid/src/probers/probers.h index cdf0682e..74c2d34e 100644 --- a/libs/blkid/src/probers/probers.h +++ b/libs/blkid/src/probers/probers.h @@ -50,6 +50,7 @@ extern const struct blkid_idinfo iso9660_idinfo; extern const struct blkid_idinfo udf_idinfo; extern const struct blkid_idinfo vfat_idinfo; extern const struct blkid_idinfo lvm2_idinfo; +extern const struct blkid_idinfo lvm1_idinfo; extern const struct blkid_idinfo luks_idinfo; extern const struct blkid_idinfo highpoint37x_idinfo; extern const struct blkid_idinfo highpoint45x_idinfo; -- 2.39.5