summaryrefslogtreecommitdiff
path: root/cmd/net.c
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2018-04-13 15:26:30 -0500
committerJoe Hershberger <joe.hershberger@ni.com>2018-04-13 15:47:57 -0500
commitd7a45eafda633edf14a8fe6fe430174889de0c4e (patch)
tree1bba5e8ae0695ff04d93ce0725d5dda56d19404c /cmd/net.c
parentb107fd5bab5d80b08f175990e902ac934719a8e2 (diff)
net: Make CMD_NET a menuconfig
Previously, CMD_NET was an alias for 2 commands (bootp and tftpboot) and they we not able to be disabled. Separate out those 2 commands and move CMD_NET up to the menu level, which more accurately represents the code. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Duncan Hare <dh@synoia.com>
Diffstat (limited to 'cmd/net.c')
-rw-r--r--cmd/net.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/net.c b/cmd/net.c
index d7c776aacf..67888d4e18 100644
--- a/cmd/net.c
+++ b/cmd/net.c
@@ -14,6 +14,7 @@
static int netboot_common(enum proto_t, cmd_tbl_t *, int, char * const []);
+#ifdef CONFIG_CMD_BOOTP
static int do_bootp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
return netboot_common(BOOTP, cmdtp, argc, argv);
@@ -24,7 +25,9 @@ U_BOOT_CMD(
"boot image via network using BOOTP/TFTP protocol",
"[loadAddress] [[hostIPaddr:]bootfilename]"
);
+#endif
+#ifdef CONFIG_CMD_TFTPBOOT
int do_tftpb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int ret;
@@ -40,6 +43,7 @@ U_BOOT_CMD(
"boot image via network using TFTP protocol",
"[loadAddress] [[hostIPaddr:]bootfilename]"
);
+#endif
#ifdef CONFIG_CMD_TFTPPUT
static int do_tftpput(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])