aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-10-20 09:18:36 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-10-20 09:18:36 +0000
commita1b6a7e572f2c09162722a382b9302a86794a4d2 (patch)
treed15362fe679dd90476a66cffbb8ecb4e42630e96 /tools/firmware-utils
parent82c182f828b3741c494d9014cedb9d0edd9af94e (diff)
downloadupstream-a1b6a7e572f2c09162722a382b9302a86794a4d2.tar.gz
upstream-a1b6a7e572f2c09162722a382b9302a86794a4d2.tar.bz2
upstream-a1b6a7e572f2c09162722a382b9302a86794a4d2.zip
firmware-utils: rename encrypt()/decrypt() in mkhilinkfw to avoid collisions
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 42998
Diffstat (limited to 'tools/firmware-utils')
-rw-r--r--tools/firmware-utils/src/mkhilinkfw.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/firmware-utils/src/mkhilinkfw.c b/tools/firmware-utils/src/mkhilinkfw.c
index 293d753dc8..99322d4ea0 100644
--- a/tools/firmware-utils/src/mkhilinkfw.c
+++ b/tools/firmware-utils/src/mkhilinkfw.c
@@ -67,8 +67,8 @@ static DES_key_schedule schedule;
static void show_usage(const char *arg0);
static void exit_cleanup(void);
static void copy_file(int src, int dst);
-static void encrypt(void *p, off_t len);
-static void decrypt(void *p, off_t len);
+static void do_encrypt(void *p, off_t len);
+static void do_decrypt(void *p, off_t len);
int main(int argc, char **argv)
@@ -210,7 +210,7 @@ int main(int argc, char **argv)
munmap(p, file_len);
exit(EXIT_FAILURE);
}
- encrypt(p, len);
+ do_encrypt(p, len);
munmap(p, file_len);
if (len != file_len) {
if (ftruncate(temp_fd, len) < 0) {
@@ -223,7 +223,7 @@ int main(int argc, char **argv)
if (decrypt_opt) {
off_t header_len = min(file_len, sizeof(image_header_t) + 3);
memcpy(buf, p, header_len);
- decrypt(buf, header_len);
+ do_decrypt(buf, header_len);
header = (image_header_t *)buf;
if (ntohl(header->ih_magic) != IH_MAGIC) {
fprintf(stderr, "Header magic incorrect: "
@@ -231,7 +231,7 @@ int main(int argc, char **argv)
IH_MAGIC, ntohl(header->ih_magic));
exit(EXIT_FAILURE);
}
- decrypt(p, file_len);
+ do_decrypt(p, file_len);
munmap(p, file_len);
}
@@ -281,7 +281,7 @@ static void copy_file(int src, int dst)
}
}
-static void encrypt(void *p, off_t len)
+static void do_encrypt(void *p, off_t len)
{
DES_cblock *pblock;
int num_blocks;
@@ -301,7 +301,7 @@ static void encrypt(void *p, off_t len)
}
}
-static void decrypt(void *p, off_t len)
+static void do_decrypt(void *p, off_t len)
{
DES_cblock *pblock;
int num_blocks;