]> err.no Git - util-linux/commitdiff
blkid: hfs - do not set UUID for emtpy finder info
authorKay Sievers <kay.sievers@vrfy.org>
Mon, 8 Dec 2008 15:28:40 +0000 (16:28 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 11 Feb 2009 22:21:51 +0000 (23:21 +0100)
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
libs/blkid/src/probers/hfs.c

index aef99524cba67c6df50a22399ee47b0e7e179743..dc30e83718a728de4c50da5ed7a8adf41c349648 100644 (file)
@@ -135,6 +135,8 @@ static int hfs_set_uuid(blkid_probe pr, unsigned char const *hfs_info)
        unsigned char uuid[16];
        struct MD5Context md5c;
 
+       if (memcmp(hfs_info, "\0\0\0\0\0\0\0\0", 8) == 0)
+               return -1;
        MD5Init(&md5c);
        MD5Update(&md5c, hash_init, 16);
        MD5Update(&md5c, hfs_info, 8);