env: Move env_set() to env.h
[oweals/u-boot.git] / cmd / md5sum.c
index 23bb81e88cbf02ca73224b244e1c2359cd9c9f2a..63cbae0364c1fe2437ea8d6c069aea327b647c6f 100644 (file)
@@ -1,15 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2011
  * Joe Hershberger, National Instruments, joe.hershberger@ni.com
  *
  * (C) Copyright 2000
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <command.h>
+#include <env.h>
 #include <mapmem.h>
 #include <u-boot/md5.h>
 #include <asm/io.h>
@@ -35,7 +35,7 @@ static void store_result(const u8 *sum, const char *dest)
                        sprintf(str_ptr, "%02x", sum[i]);
                        str_ptr += 2;
                }
-               setenv(dest, str_output);
+               env_set(dest, str_output);
        }
 }
 
@@ -54,7 +54,7 @@ static int parse_verify_sum(char *verify_str, u8 *vsum)
                if (strlen(verify_str) == 32)
                        vsum_str = verify_str;
                else {
-                       vsum_str = getenv(verify_str);
+                       vsum_str = env_get(verify_str);
                        if (vsum_str == NULL || strlen(vsum_str) != 32)
                                return 1;
                }