mirror of
https://xff.cz/git/u-boot/
synced 2025-09-27 13:31:16 +02:00
env: Move set_default_vars to env.h
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>
This commit is contained in:
@@ -820,7 +820,7 @@ static int do_env_default(cmd_tbl_t *cmdtp, int flag,
|
|||||||
}
|
}
|
||||||
if (!all && (argc > 0)) {
|
if (!all && (argc > 0)) {
|
||||||
/* Reset individual variables */
|
/* Reset individual variables */
|
||||||
set_default_vars(argc, argv, env_flag);
|
env_set_default_vars(argc, argv, env_flag);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
env/common.c
vendored
2
env/common.c
vendored
@@ -92,7 +92,7 @@ void set_default_env(const char *s, int flags)
|
|||||||
|
|
||||||
|
|
||||||
/* [re]set individual variables to their value in the default environment */
|
/* [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
|
* Special use-case: import from default environment
|
||||||
|
@@ -187,4 +187,15 @@ int eth_env_set_enetaddr(const char *name, const uint8_t *enetaddr);
|
|||||||
*/
|
*/
|
||||||
void env_fix_drivers(void);
|
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
|
#endif
|
||||||
|
@@ -274,9 +274,6 @@ char *env_get_default(const char *name);
|
|||||||
/* [re]set to the default environment */
|
/* [re]set to the default environment */
|
||||||
void set_default_env(const char *s, int flags);
|
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 */
|
/* Import from binary representation into hash table */
|
||||||
int env_import(const char *buf, int check);
|
int env_import(const char *buf, int check);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user