summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-06-02 22:04:49 -0600
committerTom Rini <trini@ti.com>2014-06-11 16:25:46 -0400
commit31890ae299bca739c58b311dfced0bb199a5f520 (patch)
treead68127a4b7b0edf821c57f27166f0708e5f0448 /common
parent7e4154a553c56ccbf877ac830e15b9c23815eb4d (diff)
downloadu-boot-imx-31890ae299bca739c58b311dfced0bb199a5f520.zip
u-boot-imx-31890ae299bca739c58b311dfced0bb199a5f520.tar.gz
u-boot-imx-31890ae299bca739c58b311dfced0bb199a5f520.tar.bz2
hash: Export the function to show a hash
This function is useful for displaying a hash value, so export it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/hash.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/common/hash.c b/common/hash.c
index 7627b84..41a4a28 100644
--- a/common/hash.c
+++ b/common/hash.c
@@ -311,8 +311,7 @@ int hash_lookup_algo(const char *algo_name, struct hash_algo **algop)
return -EPROTONOSUPPORT;
}
-static void show_hash(struct hash_algo *algo, ulong addr, ulong len,
- u8 *output)
+void hash_show(struct hash_algo *algo, ulong addr, ulong len, u8 *output)
{
int i;
@@ -392,7 +391,7 @@ int hash_command(const char *algo_name, int flags, cmd_tbl_t *cmdtp, int flag,
if (memcmp(output, vsum, algo->digest_size) != 0) {
int i;
- show_hash(algo, addr, len, output);
+ hash_show(algo, addr, len, output);
printf(" != ");
for (i = 0; i < algo->digest_size; i++)
printf("%02x", vsum[i]);
@@ -400,7 +399,7 @@ int hash_command(const char *algo_name, int flags, cmd_tbl_t *cmdtp, int flag,
return 1;
}
} else {
- show_hash(algo, addr, len, output);
+ hash_show(algo, addr, len, output);
printf("\n");
if (argc) {