diff options
author | Karel Zak | 2017-12-12 11:54:08 +0100 |
---|---|---|
committer | Karel Zak | 2017-12-12 12:06:15 +0100 |
commit | 42dea85c5aee6059052716b85aa109a2f2c7e87c (patch) | |
tree | 8751a64266bcfaae60cd0b660cd6d0258f82454a /libblkid | |
parent | lib/sha1: fix indention (diff) | |
download | kernel-qcow2-util-linux-42dea85c5aee6059052716b85aa109a2f2c7e87c.tar.gz kernel-qcow2-util-linux-42dea85c5aee6059052716b85aa109a2f2c7e87c.tar.xz kernel-qcow2-util-linux-42dea85c5aee6059052716b85aa109a2f2c7e87c.zip |
lib/md5: use ul_/UL_ prefix
The symbols names are too generic.
Addresses: https://github.com/karelzak/util-linux/issues/548
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid')
-rw-r--r-- | libblkid/src/superblocks/hfs.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/libblkid/src/superblocks/hfs.c b/libblkid/src/superblocks/hfs.c index c2344114a..19f14ed0d 100644 --- a/libblkid/src/superblocks/hfs.c +++ b/libblkid/src/superblocks/hfs.c @@ -130,19 +130,21 @@ struct hfsplus_vol_header { static int hfs_set_uuid(blkid_probe pr, unsigned char const *hfs_info, size_t len) { - static unsigned char const hash_init[MD5LENGTH] = { + static unsigned char const hash_init[UL_MD5LENGTH] = { 0xb3, 0xe2, 0x0f, 0x39, 0xf2, 0x92, 0x11, 0xd6, 0x97, 0xa4, 0x00, 0x30, 0x65, 0x43, 0xec, 0xac }; - unsigned char uuid[MD5LENGTH]; - struct MD5Context md5c; + unsigned char uuid[UL_MD5LENGTH]; + struct UL_MD5Context md5c; if (memcmp(hfs_info, "\0\0\0\0\0\0\0\0", len) == 0) return -1; - MD5Init(&md5c); - MD5Update(&md5c, hash_init, MD5LENGTH); - MD5Update(&md5c, hfs_info, len); - MD5Final(uuid, &md5c); + + ul_MD5Init(&md5c); + ul_MD5Update(&md5c, hash_init, UL_MD5LENGTH); + ul_MD5Update(&md5c, hfs_info, len); + ul_MD5Final(uuid, &md5c); + uuid[6] = 0x30 | (uuid[6] & 0x0f); uuid[8] = 0x80 | (uuid[8] & 0x3f); return blkid_probe_set_uuid(pr, uuid); |