env: make himport_r() selective on variables
Add 2 new arguments to himport_r(): o "nvars", "vars": number and list of variables to take into account (0 means ALL) NOTE: This patch does not change the current behaviour. Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com> Reviewed-by: Marek Vasut <marex@denx.de>
This commit is contained in:
committed by
Tom Rini
parent
c3f6525854
commit
348b1f1c60
@@ -196,7 +196,8 @@ void set_default_env(const char *s)
|
||||
}
|
||||
|
||||
if (himport_r(&env_htab, (char *)default_environment,
|
||||
sizeof(default_environment), '\0', 0) == 0)
|
||||
sizeof(default_environment), '\0', 0,
|
||||
0, NULL) == 0)
|
||||
error("Environment import failed: errno = %d\n", errno);
|
||||
|
||||
gd->flags |= GD_FLG_ENV_READY;
|
||||
@@ -221,7 +222,8 @@ int env_import(const char *buf, int check)
|
||||
}
|
||||
}
|
||||
|
||||
if (himport_r(&env_htab, (char *)ep->data, ENV_SIZE, '\0', 0)) {
|
||||
if (himport_r(&env_htab, (char *)ep->data, ENV_SIZE, '\0', 0,
|
||||
0, NULL)) {
|
||||
gd->flags |= GD_FLG_ENV_READY;
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user