]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
env: Move set_default_vars to env.h
authorSimon Glass <sjg@chromium.org>
Thu, 1 Aug 2019 15:46:56 +0000 (09:46 -0600)
committerTom Rini <trini@konsulko.com>
Sun, 11 Aug 2019 20:43:41 +0000 (16:43 -0400)
Move this function to the new header file and rename it so it has an env_
prefix.

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
cmd/nvedit.c
env/common.c
include/env.h
include/environment.h

index 01110e9b3a6ac24bc9c0a54aa8399f303117fcaf..d1178f6033f2954afeb8ae9f9dcfbda8e4028966 100644 (file)
@@ -820,7 +820,7 @@ static int do_env_default(cmd_tbl_t *cmdtp, int flag,
        }
        if (!all && (argc > 0)) {
                /* Reset individual variables */
-               set_default_vars(argc, argv, env_flag);
+               env_set_default_vars(argc, argv, env_flag);
                return 0;
        }
 
index 1fbc4a874d894cd5db278ca6beee30f5c5def04f..db2a033f686c3740fec70722c873b8430f54acd0 100644 (file)
@@ -92,7 +92,7 @@ void set_default_env(const char *s, int flags)
 
 
 /* [re]set individual variables to their value in the default environment */
-int set_default_vars(int nvars, char * const vars[], int flags)
+int env_set_default_vars(int nvars, char * const vars[], int flags)
 {
        /*
         * Special use-case: import from default environment
index 8082f7a0eb2d737882bdf92201a4e990592f49a0..fc3519f8c5805a5b66c9a2fd8ec20333ed006a99 100644 (file)
@@ -187,4 +187,15 @@ int eth_env_set_enetaddr(const char *name, const uint8_t *enetaddr);
  */
 void env_fix_drivers(void);
 
+/**
+ * env_set_default_vars() - reset variables to their default value
+ *
+ * This resets individual variables to their value in the default environment
+ *
+ * @nvars: Number of variables to set/reset
+ * @vars: List of variables to set/reset
+ * @flags: Flags controlling matching (H_... - see search.h)
+ */
+int env_set_default_vars(int nvars, char *const vars[], int flags);
+
 #endif
index 7be1ef98ad69980dca83aa7b7de4d7ebb7fd5cbc..97d48865994803feed9af542f5ec1338db4dcf03 100644 (file)
@@ -274,9 +274,6 @@ char *env_get_default(const char *name);
 /* [re]set to the default environment */
 void set_default_env(const char *s, int flags);
 
-/* [re]set individual variables to their value in the default environment */
-int set_default_vars(int nvars, char * const vars[], int flags);
-
 /* Import from binary representation into hash table */
 int env_import(const char *buf, int check);