summaryrefslogtreecommitdiffstats
path: root/shlibs/blkid/src/superblocks/zfs.c
diff options
context:
space:
mode:
authorKarel Zak2010-04-21 14:24:52 +0200
committerKarel Zak2010-04-21 15:49:59 +0200
commitabc67e06783aa1326b99f9ddee820cc495466e6c (patch)
tree58af5b38f418912cced901d99eae937c184404f8 /shlibs/blkid/src/superblocks/zfs.c
parentlibblkid: add partial support for superblock binary API (diff)
downloadkernel-qcow2-util-linux-abc67e06783aa1326b99f9ddee820cc495466e6c.tar.gz
kernel-qcow2-util-linux-abc67e06783aa1326b99f9ddee820cc495466e6c.tar.xz
kernel-qcow2-util-linux-abc67e06783aa1326b99f9ddee820cc495466e6c.zip
liblkid: export magic strings from raids
The library provides detected magic strings by SBMAGIC= and offsets of the magic strings by SBMAGIC_OFFSET= variables. This patch allows to support this feature for RAIDs and filesystems where the magic string is not on fixed position. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/blkid/src/superblocks/zfs.c')
-rw-r--r--shlibs/blkid/src/superblocks/zfs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/shlibs/blkid/src/superblocks/zfs.c b/shlibs/blkid/src/superblocks/zfs.c
index 1bf17ebad..af5264d46 100644
--- a/shlibs/blkid/src/superblocks/zfs.c
+++ b/shlibs/blkid/src/superblocks/zfs.c
@@ -203,6 +203,11 @@ static int probe_zfs(blkid_probe pr, const struct blkid_idmag *mag)
zfs_extract_guid_name(pr, offset);
+ if (blkid_probe_set_magic(pr, offset,
+ sizeof(ub->ub_magic),
+ (unsigned char *) &ub->ub_magic))
+ return -1;
+
return 0;
}