diff options
author | Jon Loeliger <jdl@freescale.com> | 2007-08-13 11:01:52 -0500 |
---|---|---|
committer | Jon Loeliger <jdl@freescale.com> | 2007-08-13 11:01:52 -0500 |
commit | 8e2dd87eee01bb1b83beab7caf22b851c5cafb2c (patch) | |
tree | 47a43e05d90de7d64ed356bab5f15e8d89f5b5cc /common/cmd_nvedit.c | |
parent | cca34967cbd13ff6bd352be29e3f1cc88ab24c05 (diff) | |
parent | 9986bc3e40e899bea372a99a2bca4071bdf2e24b (diff) | |
download | u-boot-imx-8e2dd87eee01bb1b83beab7caf22b851c5cafb2c.zip u-boot-imx-8e2dd87eee01bb1b83beab7caf22b851c5cafb2c.tar.gz u-boot-imx-8e2dd87eee01bb1b83beab7caf22b851c5cafb2c.tar.bz2 |
Merge commit 'remotes/wd/master'
Conflicts:
MAKEALL
With any luck, this is the last MAKEALL merge conflict!
Diffstat (limited to 'common/cmd_nvedit.c')
-rw-r--r-- | common/cmd_nvedit.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index de5a514..1db0fc3 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -193,7 +193,12 @@ int _do_setenv (int flag, int argc, char *argv[]) * Ethernet Address and serial# can be set only once, * ver is readonly. */ +#ifdef CONFIG_HAS_UID + /* Allow serial# forced overwrite with 0xdeaf4add flag */ + if ( ((strcmp (name, "serial#") == 0) && (flag != 0xdeaf4add)) || +#else if ( (strcmp (name, "serial#") == 0) || +#endif ((strcmp (name, "ethaddr") == 0) #if defined(CONFIG_OVERWRITE_ETHADDR_ONCE) && defined(CONFIG_ETHADDR) && (strcmp ((char *)env_get_addr(oldval),MK_STR(CONFIG_ETHADDR)) != 0) @@ -397,7 +402,15 @@ void setenv (char *varname, char *varvalue) _do_setenv (0, 3, argv); } -int do_setenv ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +#ifdef CONFIG_HAS_UID +void forceenv (char *varname, char *varvalue) +{ + char *argv[4] = { "forceenv", varname, varvalue, NULL }; + _do_setenv (0xdeaf4add, 3, argv); +} +#endif + +int do_setenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { if (argc < 2) { printf ("Usage:\n%s\n", cmdtp->usage); |