summaryrefslogtreecommitdiff
path: root/ubi-utils/src/bootenv.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-01-22 16:02:52 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-01-22 16:22:52 +0200
commit22f5fe49d60ea43524a902408b3112a78f2c5aae (patch)
tree873fd6ca0023a2e71eaf78292ead57af6f07e7f6 /ubi-utils/src/bootenv.c
parentf1d0f2363471837b89bf89410251f263680b683a (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/bootenv.c')
-rw-r--r--ubi-utils/src/bootenv.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/ubi-utils/src/bootenv.c b/ubi-utils/src/bootenv.c
index a6dd4de..5a4205f 100644
--- a/ubi-utils/src/bootenv.c
+++ b/ubi-utils/src/bootenv.c
@@ -282,7 +282,6 @@ bootenv_read_crc(FILE* fp, bootenv_t env, size_t size, uint32_t* ret_crc)
int rc;
char *buf = NULL;
size_t i = 0;
- uint32_t crc32_table[256];
if ((fp == NULL) || (env == NULL))
return -EINVAL;
@@ -317,8 +316,7 @@ bootenv_read_crc(FILE* fp, bootenv_t env, size_t size, uint32_t* ret_crc)
/* calculate crc to return */
if (ret_crc != NULL) {
- init_crc32_table(crc32_table);
- *ret_crc = clc_crc32(crc32_table, UBI_CRC32_INIT, buf, size);
+ *ret_crc = crc32(UBI_CRC32_INIT, buf, size);
}
/* transfer to hashmap */
@@ -442,7 +440,6 @@ bootenv_write_crc(FILE* fp, bootenv_t env, uint32_t* ret_crc)
int rc = 0;
size_t size = 0;
char *buf = NULL;
- uint32_t crc32_table[256];
if ((fp == NULL) || (env == NULL))
return -EINVAL;
@@ -458,8 +455,7 @@ bootenv_write_crc(FILE* fp, bootenv_t env, uint32_t* ret_crc)
/* calculate crc to return */
if (ret_crc != NULL) {
- init_crc32_table(crc32_table);
- *ret_crc = clc_crc32(crc32_table, UBI_CRC32_INIT, buf, size);
+ *ret_crc = crc32(UBI_CRC32_INIT, buf, size);
}
if (fwrite(buf, size, 1, fp) != 1) {