2
* Copyright (C) 2008 Karel Zak <kzak@redhat.com>
4
* Inspired by libvolume_id by
5
* Kay Sievers <kay.sievers@vrfy.org>
7
* This file may be redistributed under the terms of the
8
* GNU Lesser General Public License.
21
uint8_t minor_version;
22
uint8_t major_version;
26
#define JM_SIGNATURE "JM"
28
static int probe_jmraid(blkid_probe pr, const struct blkid_idmag *mag)
31
struct jm_metadata *jm;
33
if (pr->size < 0x10000)
36
off = ((pr->size / 0x200) - 1) * 0x200;
37
jm = (struct jm_metadata *)
38
blkid_probe_get_buffer(pr,
40
sizeof(struct jm_metadata));
43
if (memcmp(jm->signature, JM_SIGNATURE, sizeof(JM_SIGNATURE) - 1) != 0)
45
if (blkid_probe_sprintf_version(pr, "%u.%u",
46
jm->major_version, jm->minor_version) != 0)
52
const struct blkid_idinfo jmraid_idinfo = {
53
.name = "jmicron_raid_member",
54
.usage = BLKID_USAGE_RAID,
55
.probefunc = probe_jmraid,
56
.magics = BLKID_NONE_MAGIC