builtin: Remove HAVE_BUILTIN_CONTEXT macro

it's enough to decide which code should be compiled with CONFIG_BUILTIN and CONFIG_FS_BINFS

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-04-30 14:35:04 +08:00 committed by Alan Carvalho de Assis
parent 8b054dba98
commit fe5cb9529d
7 changed files with 5 additions and 27 deletions

View File

@ -147,7 +147,7 @@ void binfmt_freeargv(FAR struct binary_s *bin);
*
****************************************************************************/
#if defined(CONFIG_FS_BINFS) && defined(HAVE_BUILTIN_CONTEXT)
#ifdef CONFIG_FS_BINFS
int builtin_initialize(void);
#endif
@ -162,7 +162,7 @@ int builtin_initialize(void);
*
****************************************************************************/
#if defined(CONFIG_FS_BINFS) && defined(HAVE_BUILTIN_CONTEXT)
#ifdef CONFIG_FS_BINFS
void builtin_uninitialize(void);
#endif

View File

@ -64,7 +64,7 @@ void binfmt_initialize(void)
{
int ret;
#if defined(CONFIG_FS_BINFS) && defined(HAVE_BUILTIN_CONTEXT)
#ifdef CONFIG_FS_BINFS
ret = builtin_initialize();
if (ret < 0)
{

View File

@ -53,7 +53,7 @@
#include <nuttx/binfmt/binfmt.h>
#include <nuttx/lib/builtin.h>
#ifdef HAVE_BUILTIN_CONTEXT
#ifdef CONFIG_FS_BINFS
/****************************************************************************
* Private Function Prototypes
@ -191,4 +191,4 @@ void builtin_uninitialize(void)
unregister_binfmt(&g_builtin_binfmt);
}
#endif /* HAVE_BUILTIN_CONTEXT */
#endif /* CONFIG_FS_BINFS */

View File

@ -52,16 +52,6 @@
#ifdef CONFIG_BUILTIN
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* This logic is not usable in the KERNEL build from within the kernel. */
#if !defined(CONFIG_BUILD_KERNEL) || !defined(__KERNEL__)
# define HAVE_BUILTIN_CONTEXT
#endif
/****************************************************************************
* Public Types
****************************************************************************/

View File

@ -43,8 +43,6 @@
#include <nuttx/lib/builtin.h>
#ifdef HAVE_BUILTIN_CONTEXT
/****************************************************************************
* Public Functions
****************************************************************************/
@ -77,5 +75,3 @@ FAR const struct builtin_s *builtin_for_index(int index)
return NULL;
}
#endif /* HAVE_BUILTIN_CONTEXT */

View File

@ -48,8 +48,6 @@
#include <nuttx/lib/builtin.h>
#ifdef HAVE_BUILTIN_CONTEXT
/****************************************************************************
* Public Functions
****************************************************************************/
@ -83,5 +81,3 @@ FAR const char *builtin_getname(int index)
return NULL;
}
#endif /* HAVE_BUILTIN_CONTEXT */

View File

@ -52,8 +52,6 @@
#include <nuttx/lib/builtin.h>
#ifdef HAVE_BUILTIN_CONTEXT
/****************************************************************************
* Public Functions
****************************************************************************/
@ -92,5 +90,3 @@ int builtin_isavail(FAR const char *appname)
return -ENOENT;
}
#endif /* HAVE_BUILTIN_CONTEXT */