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 --- crc32.h | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 crc32.h (limited to 'crc32.h') diff --git a/crc32.h b/crc32.h deleted file mode 100644 index ee3145b..0000000 --- a/crc32.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef CRC32_H -#define CRC32_H - -#include - -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) -{ - const unsigned char *s = ss; - while (--len >= 0) - val = crc32_table[(val ^ *s++) & 0xff] ^ (val >> 8); - return val; -} - -#endif -- cgit v1.2.3