summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-10-22 14:18:43 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-10-22 15:29:00 +0300
commitd217a4e65084b0ef807e5749513bff16ddfb0b58 (patch)
treedca151c5d9bd2f8399684131f54b0bd7bd7c4588
parentd055f1c3e5dad8c0a73a511e1b8d2f82c9b7ab01 (diff)
UBIFS: rename crc32 function
Zlib headers also declare crc32 symbol and it confilicts with our crc32 fuction. So rename it. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
-rw-r--r--mkfs.ubifs/compr.c1
-rw-r--r--mkfs.ubifs/crc32.h2
-rw-r--r--mkfs.ubifs/mkfs.ubifs.c5
3 files changed, 5 insertions, 3 deletions
diff --git a/mkfs.ubifs/compr.c b/mkfs.ubifs/compr.c
index 285354e..73c7a01 100644
--- a/mkfs.ubifs/compr.c
+++ b/mkfs.ubifs/compr.c
@@ -30,6 +30,7 @@
#include "compr.h"
#include "ubifs-media.h"
+#include "mkfs.ubifs.h"
static void *lzo_mem;
static unsigned long long errcnt = 0;
diff --git a/mkfs.ubifs/crc32.h b/mkfs.ubifs/crc32.h
index 4b51177..86fc841 100644
--- a/mkfs.ubifs/crc32.h
+++ b/mkfs.ubifs/crc32.h
@@ -10,7 +10,7 @@
extern const uint32_t crc32_table[256];
/* Return a 32-bit CRC of the contents of the buffer. */
-static inline uint32_t crc32(uint32_t val, const void *ss, int len)
+static inline uint32_t ubifs_crc32(uint32_t val, const void *ss, int len)
{
const unsigned char *s = ss;
diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c
index e24e428..65ebc8c 100644
--- a/mkfs.ubifs/mkfs.ubifs.c
+++ b/mkfs.ubifs/mkfs.ubifs.c
@@ -649,7 +649,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 = ubifs_crc32(UBIFS_CRC32_INIT, node + 8, len - 8);
ch->crc = cpu_to_le32(crc);
}
@@ -713,7 +713,8 @@ 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, UBIFS_PAD_NODE_SZ - 8);
+ crc = ubifs_crc32(UBIFS_CRC32_INIT, buf + 8,
+ UBIFS_PAD_NODE_SZ - 8);
ch->crc = cpu_to_le32(crc);
memset(buf + UBIFS_PAD_NODE_SZ, 0, pad_len);