Add a binary 'loader' so that builtin applications can be executed from the BINFS file system
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5525 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
e5908285c4
commit
86e99bb6cf
@ -3962,3 +3962,6 @@
|
||||
* binfmt/libbuiltin/libbuiltin_utils.c: Move utility builtin
|
||||
utility functions from apps/builtin/exec_builtins.c to
|
||||
binfmt/libbuiltin/libbuiltin_utils.c
|
||||
* binfmt/builtin.c and binfmt/libbuiltin: Add a binary "loader"
|
||||
that can be used to execute builtin programs from the BINFS
|
||||
file system.
|
||||
|
195
binfmt/builtin.c
Normal file
195
binfmt/builtin.c
Normal file
@ -0,0 +1,195 @@
|
||||
/****************************************************************************
|
||||
* binfmt/builtin.c
|
||||
*
|
||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/fs/ioctl.h>
|
||||
#include <nuttx/binfmt/binfmt.h>
|
||||
#include <nuttx/binfmt/builtin.h>
|
||||
|
||||
#ifdef CONFIG_BUILTIN
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
static int builtin_loadbinary(FAR struct binary_s *binp);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
static struct binfmt_s g_builtin_binfmt =
|
||||
{
|
||||
NULL, /* next */
|
||||
builtin_loadbinary, /* load */
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: builtin_loadbinary
|
||||
*
|
||||
* Description:
|
||||
* Verify that the file is an builtin binary.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int builtin_loadbinary(struct binary_s *binp)
|
||||
{
|
||||
FAR const char *filename;
|
||||
int fd;
|
||||
int index;
|
||||
int ret;
|
||||
|
||||
bvdbg("Loading file: %s\n", binp->filename);
|
||||
|
||||
/* Open the binary file for reading (only) */
|
||||
|
||||
fd = open(filename, O_RDONLY);
|
||||
if (fd < 0)
|
||||
{
|
||||
int errval = errno;
|
||||
bdbg("ERROR: Failed to open binary %s: %d\n", filename, errval);
|
||||
return -errval;
|
||||
}
|
||||
|
||||
/* If this file is a BINFS file system, then we can recover the name of
|
||||
* the file using the FIOC_FILENAME ioctl() call.
|
||||
*/
|
||||
|
||||
ret = ioctl(fd, FIOC_FILENAME, (unsigned long)((uintptr_t)&filename));
|
||||
if (ret < 0)
|
||||
{
|
||||
int errval = errno;
|
||||
bdbg("ERROR: FIOC_FILENAME ioctl failed: %d\n", errval);
|
||||
return -errval;
|
||||
}
|
||||
|
||||
/* Other file systems may also support FIOC_FILENAME, so the real proof
|
||||
* is that we can look up the index to this name in g_builtins[].
|
||||
*/
|
||||
|
||||
index = builtin_isavail(filename);
|
||||
if (index < 0)
|
||||
{
|
||||
int errval = errno;
|
||||
bdbg("ERROR: %s is not a builtin application\n", filename);
|
||||
return -errval;
|
||||
|
||||
}
|
||||
|
||||
/* Return the load information. NOTE: that there is no way to configure
|
||||
* the priority. That is a bug and needs to be fixed.
|
||||
*/
|
||||
|
||||
binp->entrypt = g_builtins[index].main;
|
||||
binp->stacksize = g_builtins[index].stacksize;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: builtin_initialize
|
||||
*
|
||||
* Description:
|
||||
* Builtin support is built unconditionally. However, it order to
|
||||
* use this binary format, this function must be called during system
|
||||
* format in order to register the builtin binary format.
|
||||
*
|
||||
* Returned Value:
|
||||
* This is a NuttX internal function so it follows the convention that
|
||||
* 0 (OK) is returned on success and a negated errno is returned on
|
||||
* failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int builtin_initialize(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Register ourselves as a binfmt loader */
|
||||
|
||||
bvdbg("Registering Builtin Loader\n");
|
||||
|
||||
ret = register_binfmt(&g_builtin_binfmt);
|
||||
if (ret != 0)
|
||||
{
|
||||
bdbg("Failed to register binfmt: %d\n", ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: builtin_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Unregister the builtin binary loader
|
||||
*
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void builtin_uninitialize(void)
|
||||
{
|
||||
unregister_binfmt(&g_builtin_binfmt);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_BUILTIN */
|
||||
|
@ -183,7 +183,7 @@ static int elf_loadbinary(struct binary_s *binp)
|
||||
|
||||
bvdbg("Loading file: %s\n", binp->filename);
|
||||
|
||||
/* Initialize the xflat library to load the program binary. */
|
||||
/* Initialize the ELF library to load the program binary. */
|
||||
|
||||
ret = elf_init(binp->filename, &loadinfo);
|
||||
elf_dumploadinfo(&loadinfo);
|
||||
|
@ -33,11 +33,14 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
# Legacy configurations don't set CONFIG_BUILTIN
|
||||
# ifeq ($(CONFIG_BUILTIN),y)
|
||||
ifeq ($(CONFIG_BUILTIN),y)
|
||||
|
||||
# Builtin application interfaces
|
||||
|
||||
BINFMT_CSRCS += builtin.c
|
||||
|
||||
# Builtin library interfaces
|
||||
|
||||
BINFMT_CSRCS += libbuiltin_utils.c
|
||||
|
||||
# Hook the libelf subdirectory into the build
|
||||
@ -46,4 +49,4 @@ VPATH += libbuiltin
|
||||
SUBDIRS += libbuiltin
|
||||
DEPPATH += --dep-path libbuiltin
|
||||
|
||||
# endif
|
||||
endif
|
||||
|
@ -463,6 +463,7 @@ CONFIG_MM_REGIONS=1
|
||||
# CONFIG_BINFMT_DISABLE is not set
|
||||
# CONFIG_NXFLAT is not set
|
||||
# CONFIG_ELF is not set
|
||||
CONFIG_BUILTIN=y
|
||||
# CONFIG_SYMTAB_ORDEREDBYNAME is not set
|
||||
|
||||
#
|
||||
@ -505,7 +506,6 @@ CONFIG_HAVE_CXX=y
|
||||
#
|
||||
# Named Applications
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
|
||||
#
|
||||
# Examples
|
||||
|
@ -250,6 +250,8 @@ CONFIG_NSH_NOMAC=y
|
||||
CONFIG_NSH_IPADDR=0x0a000002
|
||||
CONFIG_NSH_DRIPADDR=0x0a000001
|
||||
CONFIG_NSH_NETMASK=0xffffff00
|
||||
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
|
||||
#
|
||||
|
@ -256,6 +256,8 @@ CONFIG_NSH_NOMAC=y
|
||||
CONFIG_NSH_IPADDR=0x0a000002
|
||||
CONFIG_NSH_DRIPADDR=0x0a000001
|
||||
CONFIG_NSH_NETMASK=0xffffff00
|
||||
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
|
||||
#
|
||||
|
@ -254,6 +254,8 @@ CONFIG_NSH_NOMAC=y
|
||||
CONFIG_NSH_IPADDR=0x0a000002
|
||||
CONFIG_NSH_DRIPADDR=0x0a000001
|
||||
CONFIG_NSH_NETMASK=0xffffff00
|
||||
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
|
||||
#
|
||||
|
@ -501,6 +501,15 @@ CONFIG_FAT_MAXFNAME=32
|
||||
CONFIG_MM_REGIONS=1
|
||||
# CONFIG_GRAN is not set
|
||||
|
||||
#
|
||||
# Binary Formats
|
||||
#
|
||||
# CONFIG_BINFMT_DISABLE is not set
|
||||
# CONFIG_NXFLAT is not set
|
||||
# CONFIG_ELF is not set
|
||||
CONFIG_BUILTIN=y
|
||||
# CONFIG_SYMTAB_ORDEREDBYNAME is not set
|
||||
|
||||
#
|
||||
# Library Routines
|
||||
#
|
||||
@ -531,7 +540,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
|
||||
#
|
||||
# Named Applications
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
|
||||
#
|
||||
# Examples
|
||||
|
@ -447,6 +447,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -401,7 +401,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_BUILTIN_APPS=n
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
CONFIG_NSH_LINELEN=64
|
||||
|
@ -163,7 +163,7 @@ CONFIG_RAW_BINARY=n
|
||||
#
|
||||
# General OS setup
|
||||
#
|
||||
CONFIG_USER_ENTRYPOINT="ftpc_main"
|
||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||
CONFIG_DEBUG=n
|
||||
CONFIG_DEBUG_VERBOSE=n
|
||||
CONFIG_DEBUG_SYMBOLS=n
|
||||
@ -489,6 +489,7 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="RIGHT"
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -470,6 +470,7 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="RIGHT"
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -476,6 +476,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -398,6 +398,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -562,6 +562,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -561,6 +561,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -608,6 +608,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -443,6 +443,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -463,6 +463,7 @@ CONFIG_MM_REGIONS=1
|
||||
# CONFIG_BINFMT_DISABLE is not set
|
||||
# CONFIG_NXFLAT is not set
|
||||
# CONFIG_ELF is not set
|
||||
CONFIG_BUILTIN=y
|
||||
# CONFIG_SYMTAB_ORDEREDBYNAME is not set
|
||||
|
||||
#
|
||||
@ -505,7 +506,6 @@ CONFIG_HAVE_CXX=y
|
||||
#
|
||||
# Named Applications
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
|
||||
#
|
||||
# Examples
|
||||
|
@ -586,6 +586,7 @@ CONFIG_MM_REGIONS=1
|
||||
# CONFIG_BINFMT_EXEPATH is not set
|
||||
# CONFIG_NXFLAT is not set
|
||||
# CONFIG_ELF is not set
|
||||
# CONFIG_BUILTIN is not set
|
||||
# CONFIG_PIC is not set
|
||||
# CONFIG_SYMTAB_ORDEREDBYNAME is not set
|
||||
|
||||
@ -630,7 +631,6 @@ CONFIG_HAVE_CXXINITIALIZE=y
|
||||
#
|
||||
# Named Applications
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
|
||||
#
|
||||
# Examples
|
||||
|
@ -474,7 +474,6 @@ CONFIG_HAVE_CXX=y
|
||||
#
|
||||
# Named Applications
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
|
||||
#
|
||||
# Examples
|
||||
@ -835,6 +834,7 @@ CONFIG_NETUTILS_WEBCLIENT=y
|
||||
# NSH Library
|
||||
#
|
||||
CONFIG_NSH_LIBRARY=y
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
|
||||
#
|
||||
|
@ -230,6 +230,7 @@ CONFIG_EXAMPLES_OSTEST_STACKSIZE=8192
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=1024
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -274,6 +274,7 @@ CONFIG_EXAMPLES_OSTEST_STACKSIZE=8192
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=1024
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -571,6 +571,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -496,6 +496,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -616,6 +616,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -672,6 +672,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -659,6 +659,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -562,7 +562,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_BUILTIN_APPS=n
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
CONFIG_NSH_LINELEN=64
|
||||
|
@ -672,6 +672,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -619,6 +619,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -642,6 +642,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -574,7 +574,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_BUILTIN_APPS=n
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
CONFIG_NSH_LINELEN=64
|
||||
|
@ -673,7 +673,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_BUILTIN_APPS=n
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
CONFIG_NSH_LINELEN=64
|
||||
|
@ -393,6 +393,7 @@ CONFIG_MM_REGIONS=1
|
||||
# CONFIG_BINFMT_DISABLE is not set
|
||||
# CONFIG_NXFLAT is not set
|
||||
# CONFIG_ELF is not set
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_SYMTAB_ORDEREDBYNAME=y
|
||||
|
||||
#
|
||||
@ -428,7 +429,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
|
||||
#
|
||||
# Named Applications
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
|
||||
#
|
||||
# Examples
|
||||
|
@ -603,6 +603,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -622,6 +622,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -434,6 +434,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -431,6 +431,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -421,6 +421,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -459,6 +459,7 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
|
||||
#
|
||||
# Settings for apps/nshlib
|
||||
#
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_STRERROR=n
|
||||
|
@ -221,7 +221,7 @@ int mount(FAR const char *source, FAR const char *target,
|
||||
/* Find the specified filesystem. Try the block driver file systems first */
|
||||
|
||||
#ifdef BDFS_SUPPORT
|
||||
if ((mops = mount_findfs(g_bdfsmap, filesystemtype)) != NULL)
|
||||
if (source && (mops = mount_findfs(g_bdfsmap, filesystemtype)) != NULL)
|
||||
{
|
||||
/* Make sure that a block driver argument was provided */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user