From: Milan Broz Date: Thu, 7 May 2009 17:00:44 +0000 (+0200) Subject: blkid: add device-mapper snapshot cow device probe X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8d20dc1971477d3ef684f540a7f878467c0b9cf;p=util-linux blkid: add device-mapper snapshot cow device probe The copy-on-write area of device-mapper snapshot has SnAp identifier, disk header is written directly by kernel. [kzak@redhat.com: - rename from "snap_cow" to "DM_snapshot_cow"] Signed-off-by: Milan Broz Signed-off-by: Karel Zak --- diff --git a/shlibs/blkid/src/probe.c b/shlibs/blkid/src/probe.c index b2b888d4..6e73696a 100644 --- a/shlibs/blkid/src/probe.c +++ b/shlibs/blkid/src/probe.c @@ -55,6 +55,7 @@ static const struct blkid_idinfo *idinfos[] = &jmraid_idinfo, &lvm2_idinfo, &lvm1_idinfo, + &snapcow_idinfo, &luks_idinfo, /* Filesystems */ diff --git a/shlibs/blkid/src/probers/lvm.c b/shlibs/blkid/src/probers/lvm.c index d80d023d..d8edc37a 100644 --- a/shlibs/blkid/src/probers/lvm.c +++ b/shlibs/blkid/src/probers/lvm.c @@ -164,4 +164,13 @@ const struct blkid_idinfo lvm1_idinfo = } }; - +const struct blkid_idinfo snapcow_idinfo = +{ + .name = "DM_snapshot_cow", + .usage = BLKID_USAGE_OTHER, + .magics = + { + { .magic = "SnAp", .len = 4 }, + { NULL } + } +}; diff --git a/shlibs/blkid/src/probers/probers.h b/shlibs/blkid/src/probers/probers.h index c3b22774..78dbd406 100644 --- a/shlibs/blkid/src/probers/probers.h +++ b/shlibs/blkid/src/probers/probers.h @@ -47,6 +47,7 @@ extern const struct blkid_idinfo ufs_idinfo; extern const struct blkid_idinfo hpfs_idinfo; extern const struct blkid_idinfo lvm2_idinfo; extern const struct blkid_idinfo lvm1_idinfo; +extern const struct blkid_idinfo snapcow_idinfo; extern const struct blkid_idinfo luks_idinfo; extern const struct blkid_idinfo highpoint37x_idinfo; extern const struct blkid_idinfo highpoint45x_idinfo;