diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-08-30 20:13:50 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-08-30 20:13:50 +0000 |
commit | 79c7065433ae27932ad8b781d38b8f7832b01581 (patch) | |
tree | f770414832eeecb35adb70404b31d147afad7235 /apps/examples/telnetd | |
parent | f9d19788072090be80b71ab0d0de14507a6e739b (diff) | |
download | px4-nuttx-79c7065433ae27932ad8b781d38b8f7832b01581.tar.gz px4-nuttx-79c7065433ae27932ad8b781d38b8f7832b01581.tar.bz2 px4-nuttx-79c7065433ae27932ad8b781d38b8f7832b01581.zip |
Add configurable application entry point
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5070 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/examples/telnetd')
-rw-r--r-- | apps/examples/telnetd/shell.c | 8 | ||||
-rw-r--r-- | apps/examples/telnetd/shell.h | 10 |
2 files changed, 4 insertions, 14 deletions
diff --git a/apps/examples/telnetd/shell.c b/apps/examples/telnetd/shell.c index 01c620e1e..3033698c5 100644 --- a/apps/examples/telnetd/shell.c +++ b/apps/examples/telnetd/shell.c @@ -222,14 +222,14 @@ static void shell_netinit(void) * Public Functions ****************************************************************************/ -int MAIN_NAME(int argc, char *argv[]) +int shell_main(int argc, char *argv[]) { struct telnetd_config_s config; int ret; /* Configure the network */ - printf(MAIN_STRING "Initializing the network\n"); + printf("shell_main: Initializing the network\n"); shell_netinit(); /* Configure the telnet daemon */ @@ -243,13 +243,13 @@ int MAIN_NAME(int argc, char *argv[]) /* Start the telnet daemon */ - printf(MAIN_STRING "Starting the Telnet daemon\n"); + printf("shell_main: Starting the Telnet daemon\n"); ret = telnetd_start(&config); if (ret < 0) { printf("Failed to tart the Telnet daemon\n"); } - printf(MAIN_STRING "Exiting\n"); + printf("shell_main: Exiting\n"); return 0; } diff --git a/apps/examples/telnetd/shell.h b/apps/examples/telnetd/shell.h index 23b30fda7..a5cec32b3 100644 --- a/apps/examples/telnetd/shell.h +++ b/apps/examples/telnetd/shell.h @@ -81,16 +81,6 @@ # define CONFIG_EXAMPLE_TELNETD_NETMASK 0xffffff00 #endif -/* Is this being built as an NSH built-in application? */ - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME shell_main -# define MAIN_STRING "shell_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - /* Other definitions ********************************************************/ #define SHELL_PROMPT "uIP 1.0> " |