diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2015-05-20 14:27:22 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-05-21 09:13:20 -0400 |
commit | 73c2bbeea3d09bb8c81adc8769fc53493b6c0351 (patch) | |
tree | e020d78e9a707bee28af09d3a009a382b7a6e132 /test | |
parent | 94b467b14ed908c89a0780256e89b375aa3cf3ef (diff) |
net: Apply default format rules to all ethaddr
Use a regular expression to apply the default formatting flags for all
ethaddr env vars.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/dm/eth.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/dm/eth.c b/test/dm/eth.c index 196eba85a2b..f31f6b322d7 100644 --- a/test/dm/eth.c +++ b/test/dm/eth.c @@ -89,6 +89,8 @@ static int dm_test_eth_rotate(struct dm_test_state *dms) /* Invalidate eth1's MAC address */ net_ping_ip = string_to_ip("1.1.2.2"); strcpy(ethaddr, getenv("eth1addr")); + /* Must disable access protection for eth1addr before clearing */ + setenv(".flags", "eth1addr"); setenv("eth1addr", NULL); /* Make sure that the default is to rotate to the next interface */ @@ -108,6 +110,7 @@ static int dm_test_eth_rotate(struct dm_test_state *dms) /* Invalidate eth0's MAC address */ strcpy(ethaddr, getenv("ethaddr")); + /* Must disable access protection for ethaddr before clearing */ setenv(".flags", "ethaddr"); setenv("ethaddr", NULL); |