]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
blkid: Report correct UUID from MD superblocks
authorSergey Vlasov <vsu@altlinux.ru>
Tue, 10 Apr 2007 16:00:38 +0000 (12:00 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 10 Apr 2007 16:00:38 +0000 (12:00 -0400)
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>
lib/blkid/probe.c

index b8a75de76f93bc5c25bdd6043172bfc751e56777..3f0829cc6ddda234d0c3e1d35b96ee4cee3736e2 100644 (file)
@@ -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;
 }