aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src/buffalo-enc.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-06-13 08:12:41 +0000
committerGabor Juhos <juhosg@openwrt.org>2011-06-13 08:12:41 +0000
commit0d7a558f23b6bc421e9c0ab69c73576501523e68 (patch)
treec74e3afaea755c18d9f50874dcbb464200bff894 /tools/firmware-utils/src/buffalo-enc.c
parentb7e016ba42728e41ffb28ee6074eac4aa5ff0101 (diff)
downloadupstream-0d7a558f23b6bc421e9c0ab69c73576501523e68.tar.gz
upstream-0d7a558f23b6bc421e9c0ab69c73576501523e68.tar.bz2
upstream-0d7a558f23b6bc421e9c0ab69c73576501523e68.zip
tools/firmware-utils: fix buffalo csum calculation
Also print an error message if decryption fails. SVN-Revision: 27167
Diffstat (limited to 'tools/firmware-utils/src/buffalo-enc.c')
-rw-r--r--tools/firmware-utils/src/buffalo-enc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/firmware-utils/src/buffalo-enc.c b/tools/firmware-utils/src/buffalo-enc.c
index 94de53e910..13d270b3f7 100644
--- a/tools/firmware-utils/src/buffalo-enc.c
+++ b/tools/firmware-utils/src/buffalo-enc.c
@@ -87,8 +87,10 @@ static int decrypt_file(void)
ep.key = (unsigned char *) crypt_key;
err = decrypt_buf(&ep, buf, src_len);
- if (err)
+ if (err) {
+ ERR("unable to decrypt '%s'", ifname);
goto out;
+ }
printf("Magic\t\t: '%s'\n", ep.magic);
printf("Seed\t\t: 0x%02x\n", ep.seed);