aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJoe Hershberger2018-07-03 19:36:42 -0500
committerJoe Hershberger2018-07-26 14:08:20 -0500
commitf43308fa0c7834d9707a2c212591275d1e095e50 (patch)
tree2c70d2c73a657c2df736b335b32fd77a2b2bc8ff /net
parent16cf145fd659a01c5db7f286e8c9a4700f736920 (diff)
downloadu-boot-f43308fa0c7834d9707a2c212591275d1e095e50.tar.gz
u-boot-f43308fa0c7834d9707a2c212591275d1e095e50.tar.xz
u-boot-f43308fa0c7834d9707a2c212591275d1e095e50.zip
net: Read bootfile from env on netboot_common()
Instead of depending on a env callback for bootfile, read it explicitly. We do this because the bootfile can be specified on the command line and if it is, we will overwrite the internal variable. If a netboot_common() is called again with no bootfile parameter, we want to use the one in the environment. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'net')
-rw-r--r--net/net.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/net/net.c b/net/net.c
index 333102ea79..1b6781d358 100644
--- a/net/net.c
+++ b/net/net.c
@@ -216,26 +216,6 @@ int __maybe_unused net_busy_flag;
216 216
217/**********************************************************************/ 217/**********************************************************************/
218 218
219static int on_bootfile(const char *name, const char *value, enum env_op op,
220 int flags)
221{
222 if (flags & H_PROGRAMMATIC)
223 return 0;
224
225 switch (op) {
226 case env_op_create:
227 case env_op_overwrite:
228 copy_filename(net_boot_file_name, value,
229 sizeof(net_boot_file_name));
230 break;
231 default:
232 break;
233 }
234
235 return 0;
236}
237U_BOOT_ENV_CALLBACK(bootfile, on_bootfile);
238
239static int on_ipaddr(const char *name, const char *value, enum env_op op, 219static int on_ipaddr(const char *name, const char *value, enum env_op op,
240 int flags) 220 int flags)
241{ 221{