From: Sergey Vlasov Date: Tue, 10 Apr 2007 16:00:38 +0000 (-0400) Subject: blkid: Report correct UUID from MD superblocks X-Git-Tag: E2FSPROGS-1_40~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9105ffbe55d2a25dea9fab0595baace3a59bd51;p=thirdparty%2Fe2fsprogs.git blkid: Report correct UUID from MD superblocks 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 Signed-off-by: Dmitry V. Levin --- diff --git a/lib/blkid/probe.c b/lib/blkid/probe.c index b8a75de76..3f0829cc6 100644 --- a/lib/blkid/probe.c +++ b/lib/blkid/probe.c @@ -116,7 +116,7 @@ static int check_mdraid(int fd, unsigned char *ret_uuid) 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; }