summaryrefslogtreecommitdiff
path: root/mkfs.ubifs/mkfs.ubifs.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 /mkfs.ubifs/mkfs.ubifs.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 'mkfs.ubifs/mkfs.ubifs.c')
-rw-r--r--mkfs.ubifs/mkfs.ubifs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c
index b3dd9bb..9f2a226 100644
--- a/mkfs.ubifs/mkfs.ubifs.c
+++ b/mkfs.ubifs/mkfs.ubifs.c
@@ -753,7 +753,7 @@ static void prepare_node(void *node, int len)
ch->group_type = UBIFS_NO_NODE_GROUP;
ch->sqnum = cpu_to_le64(++c->max_sqnum);
ch->padding[0] = ch->padding[1] = 0;
- crc = crc32(UBIFS_CRC32_INIT, node + 8, len - 8);
+ crc = mtd_crc32(UBIFS_CRC32_INIT, node + 8, len - 8);
ch->crc = cpu_to_le32(crc);
}
@@ -823,7 +823,7 @@ static int do_pad(void *buf, int len)
pad_len -= UBIFS_PAD_NODE_SZ;
pad_node->pad_len = cpu_to_le32(pad_len);
- crc = crc32(UBIFS_CRC32_INIT, buf + 8,
+ crc = mtd_crc32(UBIFS_CRC32_INIT, buf + 8,
UBIFS_PAD_NODE_SZ - 8);
ch->crc = cpu_to_le32(crc);