From 22f5fe49d60ea43524a902408b3112a78f2c5aae Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Tue, 22 Jan 2008 16:02:52 +0200 Subject: ubi-utils: massive changes This commit basically removes most of the old ubi utilities as they are barely maintainamble. Signed-off-by: Artem Bityutskiy --- ubi-utils/src/ubicrc32.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'ubi-utils/src/ubicrc32.c') diff --git a/ubi-utils/src/ubicrc32.c b/ubi-utils/src/ubicrc32.c index 0f10b31..8064439 100644 --- a/ubi-utils/src/ubicrc32.c +++ b/ubi-utils/src/ubicrc32.c @@ -91,8 +91,7 @@ static int parse_opt(int argc, char * const argv[]) int main(int argc, char * const argv[]) { int err = 0; - uint32_t crc32_table[256]; - uint32_t crc32 = UBI_CRC32_INIT; + uint32_t crc = UBI_CRC32_INIT; char buf[BUFSIZE]; FILE *fp; @@ -110,8 +109,6 @@ int main(int argc, char * const argv[]) if (err) return err; - init_crc32_table(crc32_table); - while (!feof(fp)) { size_t read; @@ -122,10 +119,10 @@ int main(int argc, char * const argv[]) err = -1; goto out_close; } - crc32 = clc_crc32(crc32_table, crc32, buf, read); + crc = crc32(crc, buf, read); } - printf("0x%08x\n", crc32); + printf("0x%08x\n", crc); out_close: if (fp != stdin) -- cgit v1.2.3