From 33c6a6bb758595aa8cb58f1905f9ec516d236735 Mon Sep 17 00:00:00 2001 From: Marten Svanfeldt Date: Mon, 19 Oct 2015 12:05:17 +0800 Subject: [PATCH] Make NSH net-initialization be a configuration option Signed-off-by: Marten Svanfeldt --- nshlib/Kconfig | 10 ++++++++++ nshlib/nsh.h | 2 +- nshlib/nsh_netinit.c | 4 ++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/nshlib/Kconfig b/nshlib/Kconfig index 81c14f173..eabdcb6f6 100644 --- a/nshlib/Kconfig +++ b/nshlib/Kconfig @@ -942,6 +942,15 @@ config NSH_ARCHINIT menu "Networking Configuration" depends on NET +config NSH_NETINIT + bool "Network initialization" + default y + depends on NET + ---help--- + This option enables/disables all network initialization in NSH. + +if NSH_NETINIT + config NSH_NETINIT_THREAD bool "Network initialization thread" default n @@ -1389,6 +1398,7 @@ config NSH_MACADDR MAC address must provided with this selection. endif # NSH_NOMAC +endif # NSH_NETINIT config NSH_MAX_ROUNDTRIP int "Max Ping Round-Trip (DSEC)" diff --git a/nshlib/nsh.h b/nshlib/nsh.h index 1ed07a124..48166ea58 100644 --- a/nshlib/nsh.h +++ b/nshlib/nsh.h @@ -843,7 +843,7 @@ int nsh_romfsetc(void); # define nsh_romfsetc() (-ENOSYS) #endif -#ifdef CONFIG_NET +#ifdef CONFIG_NSH_NETINIT int nsh_netinit(void); #else # define nsh_netinit() (-ENOSYS) diff --git a/nshlib/nsh_netinit.c b/nshlib/nsh_netinit.c index 38e20aeb2..03e6b6c42 100644 --- a/nshlib/nsh_netinit.c +++ b/nshlib/nsh_netinit.c @@ -74,7 +74,7 @@ #include "nsh.h" -#ifdef CONFIG_NET +#ifdef CONFIG_NSH_NETINIT /**************************************************************************** * Pre-processor Definitions @@ -689,4 +689,4 @@ int nsh_netinit(void) #endif } -#endif /* CONFIG_NET */ +#endif /* CONFIG_NSH_NETINIT */