mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 06:23:33 +08:00
Rename namedapp as simply builtin
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5454 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+4
-4
@@ -15,12 +15,12 @@ if NSH_LIBRARY
|
||||
config NSH_BUILTIN_APPS
|
||||
bool "Enable built-in applications"
|
||||
default y
|
||||
depends on NAMEDAPP
|
||||
depends on BUILTIN
|
||||
---help---
|
||||
Support external registered, "named" applications that can be
|
||||
Support external registered, "built-in" applications that can be
|
||||
executed from the NSH command line (see apps/README.txt for
|
||||
more information). This options requires support for named applications
|
||||
(NAMEDAPP).
|
||||
more information). This options requires support for builtin
|
||||
applications (BUILTIN).
|
||||
|
||||
menu "Disable Individual commands"
|
||||
|
||||
|
||||
@@ -945,7 +945,7 @@ NSH-Specific Configuration Settings
|
||||
the configs/<board-name>/defconfig file:
|
||||
|
||||
* CONFIG_NSH_BUILTIN_APPS
|
||||
Support external registered, "named" applications that can be
|
||||
Support external registered, "builtin" applications that can be
|
||||
executed from the NSH command line (see apps/README.txt for
|
||||
more information).
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
* Attempt to execute the application task whose name is 'cmd'
|
||||
*
|
||||
* Returned Value:
|
||||
* <0 If exec_namedapp() fails, then the negated errno value
|
||||
* <0 If exec_builtin() fails, then the negated errno value
|
||||
* is returned.
|
||||
* -1 (ERROR) if the application task corresponding to 'cmd' could not
|
||||
* be started (possibly because it doesn not exist).
|
||||
@@ -119,7 +119,7 @@ int nsh_execapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
|
||||
* applications.
|
||||
*/
|
||||
|
||||
ret = exec_namedapp(cmd, (FAR const char **)argv);
|
||||
ret = exec_builtin(cmd, (FAR const char **)argv);
|
||||
if (ret >= 0)
|
||||
{
|
||||
/* The application was successfully started (but still blocked because
|
||||
@@ -205,7 +205,7 @@ int nsh_execapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
|
||||
|
||||
sched_unlock();
|
||||
|
||||
/* If exec_namedapp() or waitpid() failed, then return the negated errno
|
||||
/* If exec_builtin() or waitpid() failed, then return the negated errno
|
||||
* value.
|
||||
*/
|
||||
|
||||
|
||||
@@ -605,7 +605,7 @@ static inline void help_builtins(FAR struct nsh_vtbl_s *vtbl)
|
||||
/* List the set of available built-in commands */
|
||||
|
||||
nsh_output(vtbl, "\nBuiltin Apps:\n");
|
||||
for (i = 0; (name = namedapp_getname(i)) != NULL; i++)
|
||||
for (i = 0; (name = builtin_getname(i)) != NULL; i++)
|
||||
{
|
||||
nsh_output(vtbl, " %s\n", name);
|
||||
}
|
||||
@@ -726,7 +726,7 @@ static int cmd_exit(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
* Exectue the command in argv[0]
|
||||
*
|
||||
* Returned Value:
|
||||
* <0 If exec_namedapp() fails, then the negated errno value
|
||||
* <0 If exec_builtin() fails, then the negated errno value
|
||||
* is returned.
|
||||
* -1 (ERRROR) if the command was unsuccessful
|
||||
* 0 (OK) if the command was successful
|
||||
@@ -1439,13 +1439,13 @@ int nsh_parse(FAR struct nsh_vtbl_s *vtbl, char *cmdline)
|
||||
}
|
||||
|
||||
/* Handle the case where the command is executed in background.
|
||||
* However is app is to be started as namedapp new process will
|
||||
* However is app is to be started as builtin new process will
|
||||
* be created anyway, so skip this step. */
|
||||
|
||||
#ifndef CONFIG_NSH_DISABLEBG
|
||||
if (vtbl->np.np_bg
|
||||
#ifdef CONFIG_NSH_BUILTIN_APPS
|
||||
&& namedapp_isavail(argv[0]) < 0
|
||||
&& builtin_isavail(argv[0]) < 0
|
||||
#endif
|
||||
)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user