From 20190a89f724704d7a93e17163fbdfb1347b3aee Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 27 Jan 2015 15:26:03 -0600 Subject: Unix domain: With these changes I can build a system with no link layer enabled, only Unix domain sockets --- apps/nshlib/nsh.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'apps') diff --git a/apps/nshlib/nsh.h b/apps/nshlib/nsh.h index 1bd41f319..eccf5c23d 100644 --- a/apps/nshlib/nsh.h +++ b/apps/nshlib/nsh.h @@ -154,6 +154,22 @@ # define CONFIG_NSH_NETINIT_THREAD_PRIORITY 100 #endif +/* Some networking commands do not make sense unless there is a network + * device. There might not be a network device if, for example, only Unix + * domain sockets were enable. + */ + +#if !defined(CONFIG_NET_ETHERNET) && !defined(CONFIG_NET_SLIP) + /* No link layer protocol is a good indication that there is no network + * device. + */ + +# undef CONFIG_NSH_DISABLE_IFUPDOWN +# undef CONFIG_NSH_DISABLE_IFCONFIG +# define CONFIG_NSH_DISABLE_IFUPDOWN 1 +# define CONFIG_NSH_DISABLE_IFCONFIG 1 +#endif + /* Telnetd requires networking support */ #ifndef CONFIG_NET -- cgit v1.2.3