diff options
| author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-01-22 16:02:52 +0200 | 
|---|---|---|
| committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-01-22 16:22:52 +0200 | 
| commit | 22f5fe49d60ea43524a902408b3112a78f2c5aae (patch) | |
| tree | 873fd6ca0023a2e71eaf78292ead57af6f07e7f6 /ubi-utils/src/ubicrc32.c | |
| parent | f1d0f2363471837b89bf89410251f263680b683a (diff) | |
ubi-utils: massive changes
This commit basically removes most of the old ubi utilities
as they are barely maintainamble.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/src/ubicrc32.c')
| -rw-r--r-- | ubi-utils/src/ubicrc32.c | 9 | 
1 files changed, 3 insertions, 6 deletions
| 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) | 
