mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 19:53:34 +08:00
Rename apps/include/apps.h to builtin.h. Move parts of apps/builtins/exec_builtin.c to binfmt/libbuiltin/libbuiltin_utils.c
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5524 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/binfmt/builtin.h>
|
||||
#include <apps/apps.h>
|
||||
#include <apps/builtin.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@@ -365,50 +365,6 @@ errout:
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: builtin_getname
|
||||
*
|
||||
* Description:
|
||||
* Return the name of the application at index in the table of builtin
|
||||
* applications.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
const char *builtin_getname(int index)
|
||||
{
|
||||
if (index < 0 || index >= number_builtins())
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return g_builtins[index].name;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: builtin_isavail
|
||||
*
|
||||
* Description:
|
||||
* Return the index into the table of applications for the applicaiton with
|
||||
* the name 'appname'.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int builtin_isavail(FAR const char *appname)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; g_builtins[i].name; i++)
|
||||
{
|
||||
if (!strcmp(g_builtins[i].name, appname))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
set_errno(ENOENT);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: exec_builtin
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user