The second part of UUID was copied to a wrong place in the buffer.
Now the UUID shown by blkid is the same as shown by /lib/udev/vol_id
(at least with udev-108), but is not in the same form as used by mdadm
(which prints UUID as 4 32-bit words and uses different endiannes).
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
md = (struct mdp_superblock_s *)buf;
if (md->set_uuid0 || md->set_uuid1 || md->set_uuid2 || md->set_uuid3) {
memcpy(ret_uuid, &md->set_uuid0, 4);
- memcpy(ret_uuid, &md->set_uuid1, 12);
+ memcpy(ret_uuid + 4, &md->set_uuid1, 12);
}
return 0;
}