mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 07:33:35 +08:00
Add configurable application entry point
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5070 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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> "
|
||||
|
||||
Reference in New Issue
Block a user