--- embedtools/src/ub_env.c 2014/01/30 01:03:24 1.1.2.17 +++ embedtools/src/ub_env.c 2017/01/22 20:40:10 1.2.14.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ - * $Id: ub_env.c,v 1.1.2.17 2014/01/30 01:03:24 misho Exp $ + * $Id: ub_env.c,v 1.2.14.1 2017/01/22 20:40:10 misho Exp $ * ************************************************************************* The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004 - 2014 +Copyright 2004 - 2017 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -93,11 +93,11 @@ ub_flash_io(const char *csSec, int mode) } if (mode & O_RDWR) { - env->env_crc = crc32(0, (u_char*) env->env_data, esiz); + env->env_crc = crc_32(0, (u_char*) env->env_data, esiz); VERB(5) printf("Write CRC32 0x%x\n", env->env_crc); rlen = write(f, env, siz); if (rlen != siz) - printf("Error:: written %d bytes != %d\n", rlen, siz); + printf("Error:: written %d bytes != %zd\n", rlen, siz); else VERB(3) printf("Written %d bytes\n", rlen); lseek(f, 0, SEEK_SET); @@ -105,11 +105,11 @@ ub_flash_io(const char *csSec, int mode) rlen = read(f, env, siz); if (rlen != siz) - printf("Error:: readed %d bytes != %d\n", rlen, siz); + printf("Error:: readed %d bytes != %zd\n", rlen, siz); else VERB(3) printf("Readed %d bytes\n", rlen); - crc = crc32(0, (u_char*) env->env_data, esiz); + crc = crc_32(0, (u_char*) env->env_data, esiz); VERB(5) printf("Calculated CRC32 0x%x\n", crc); if (crc != env->env_crc) VERB(1) printf("Warning:: Bad CRC, Flash crc32 0x%x != 0x%x\n",