1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-03 17:52:07 +02:00

env: make "env default" selective, check and apply

Change the syntax (user API) for "env default":
  -f: override write-once variables
  var... : accept individual variable(s)
  -a: all (resetting the whole env is NOT the default behavior)

Enable variable checking and make changes effective by
enabling do_apply argument to himport_r().

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
This commit is contained in:
Gerlando Falauto
2012-08-24 00:11:41 +00:00
committed by Tom Rini
parent 152874b65b
commit b64b7c3df7
3 changed files with 64 additions and 7 deletions

View File

@@ -181,6 +181,9 @@ void env_crc_update(void);
/* [re]set to the default environment */
void set_default_env(const char *s);
/* [re]set individual variables to their value in the default environment */
int set_default_vars(int nvars, char * const vars[]);
/* Import from binary representation into hash table */
int env_import(const char *buf, int check);