From 8f627247f651e80834d7b0441328151be180b335 Mon Sep 17 00:00:00 2001 From: Kevin Cernekee Date: Wed, 7 Jul 2010 17:30:10 -0700 Subject: mtd-utils: move libmtd source files to lib/ subdirectory Source files for libmtd, crc32, and fec are scattered throughout the tree. Move them to a central location so they can be built into a common "libmtd.a" library used by all mtd-utils programs. This patch only renames/deletes files and does not change the content. Also modify the build system and source code so that libmtd.a can be built from a "common" location (lib/). Statically link all utilities at the top level with libmtd.a . Minor changes to mkfs.ubifs to allow using the common crc32 implementation. Signed-off-by: Kevin Cernekee Signed-off-by: Artem Bityutskiy --- mkfs.ubifs/mkfs.ubifs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mkfs.ubifs/mkfs.ubifs.c') diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c index e4b4e3c..95b20b0 100644 --- a/mkfs.ubifs/mkfs.ubifs.c +++ b/mkfs.ubifs/mkfs.ubifs.c @@ -21,6 +21,7 @@ */ #include "mkfs.ubifs.h" +#include #define PROGRAM_VERSION "1.3" @@ -752,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 = ubifs_crc32(UBIFS_CRC32_INIT, node + 8, len - 8); + crc = crc32(UBIFS_CRC32_INIT, node + 8, len - 8); ch->crc = cpu_to_le32(crc); } @@ -822,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 = ubifs_crc32(UBIFS_CRC32_INIT, buf + 8, + crc = crc32(UBIFS_CRC32_INIT, buf + 8, UBIFS_PAD_NODE_SZ - 8); ch->crc = cpu_to_le32(crc); -- cgit v1.2.3