aboutsummaryrefslogtreecommitdiff
path: root/ubi-utils/src/libscan.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-09-01 14:10:21 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-09-01 14:31:52 +0300
commit8ab9e98ce27487c40289664d6cb1a58f963679cb (patch)
tree030ab5ecebdd08767bc34e0fb08f14b2d361c34b /ubi-utils/src/libscan.c
parentf49f5405d6baeaf074b1803a6abc116caf130b9d (diff)
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 <Jon.Povey@racelogic.co.uk> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/src/libscan.c')
-rw-r--r--ubi-utils/src/libscan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ubi-utils/src/libscan.c b/ubi-utils/src/libscan.c
index 85f3d7f..6c6990f 100644
--- a/ubi-utils/src/libscan.c
+++ b/ubi-utils/src/libscan.c
@@ -116,7 +116,7 @@ int ubi_scan(struct mtd_dev_info *mtd, int fd, struct ubi_scan_info **info,
continue;
}
- crc = crc32(UBI_CRC32_INIT, &ech, UBI_EC_HDR_SIZE_CRC);
+ crc = mtd_crc32(UBI_CRC32_INIT, &ech, UBI_EC_HDR_SIZE_CRC);
if (be32_to_cpu(ech.hdr_crc) != crc) {
si->corrupted_cnt += 1;
si->ec[eb] = EB_CORRUPTED;