2 * Copyright (C) 2017 Rafał Miłecki <rafal@milecki.pl>
4 * This file may be redistributed under the terms of the
5 * GNU Lesser General Public License.
13 #include "superblocks.h"
20 uint32_t vid_hdr_offset;
25 } __attribute__((packed));
27 static int probe_ubi(blkid_probe pr, const struct blkid_idmag *mag)
29 struct ubi_ec_hdr *hdr;
31 hdr = blkid_probe_get_sb(pr, mag, struct ubi_ec_hdr);
35 blkid_probe_sprintf_version(pr, "%u", hdr->version);
36 blkid_probe_sprintf_uuid(pr, (unsigned char *)&hdr->image_seq, 4, "%u",
37 be32_to_cpu(hdr->image_seq));
41 const struct blkid_idinfo ubi_idinfo =
44 .usage = BLKID_USAGE_RAID,
45 .probefunc = probe_ubi,
48 { .magic = "UBI#", .len = 4 },