]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_hash.c
hash: Use lower case for hash algorithm names
[karo-tx-uboot.git] / common / cmd_hash.c
index 8c03b5c7238c354cdc2ca0ebb0e275c92f23f537..4fe0e7861369f5d5198361f628244d7f260a55b2 100644 (file)
 #include <common.h>
 #include <command.h>
 #include <hash.h>
+#include <linux/ctype.h>
 
 static int do_hash(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
+       char *s;
 #ifdef CONFIG_HASH_VERIFY
        int flags = HASH_FLAG_ENV;
 
@@ -45,6 +47,8 @@ static int do_hash(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        /* Move forward to 'algorithm' parameter */
        argc--;
        argv++;
+       for (s = *argv; *s; s++)
+               *s = tolower(*s);
        return hash_command(*argv, flags, cmdtp, flag, argc - 1, argv + 1);
 }