From 8ab9e98ce27487c40289664d6cb1a58f963679cb Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Wed, 1 Sep 2010 14:10:21 +0300 Subject: rename crc32 to mtd_crc32 Because of namespace collisions mkfs.ubifs uses crc32() implementation from /lib/libz.so.1, which generates incompatible CRC and later on the kernel reports many CRC errors. Fix this by re-naming mtd-utils' crc32 function to mtd_crc32. Reported-by: Jon Povey Signed-off-by: Artem Bityutskiy --- ubi-utils/src/ubiformat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ubi-utils/src/ubiformat.c') diff --git a/ubi-utils/src/ubiformat.c b/ubi-utils/src/ubiformat.c index 4e27e4f..8559f61 100644 --- a/ubi-utils/src/ubiformat.c +++ b/ubi-utils/src/ubiformat.c @@ -306,14 +306,14 @@ static int change_ech(struct ubi_ec_hdr *hdr, uint32_t image_seq, return errmsg("bad UBI magic %#08x, should be %#08x", be32_to_cpu(hdr->magic), UBI_EC_HDR_MAGIC); - crc = crc32(UBI_CRC32_INIT, hdr, UBI_EC_HDR_SIZE_CRC); + crc = mtd_crc32(UBI_CRC32_INIT, hdr, UBI_EC_HDR_SIZE_CRC); if (be32_to_cpu(hdr->hdr_crc) != crc) return errmsg("bad CRC %#08x, should be %#08x\n", crc, be32_to_cpu(hdr->hdr_crc)); hdr->image_seq = cpu_to_be32(image_seq); hdr->ec = cpu_to_be64(ec); - crc = crc32(UBI_CRC32_INIT, hdr, UBI_EC_HDR_SIZE_CRC); + crc = mtd_crc32(UBI_CRC32_INIT, hdr, UBI_EC_HDR_SIZE_CRC); hdr->hdr_crc = cpu_to_be32(crc); return 0; -- cgit v1.2.3