FS: Don't build block driver proxy if PSEUDOFS_OPERATIONS are disabled.

This commit is contained in:
Gregory Nutt 2017-03-04 08:25:20 -06:00
parent 0a192361de
commit ee8abb8160
3 changed files with 8 additions and 3 deletions

View File

@ -44,8 +44,11 @@ CSRCS += fs_registerdriver.c fs_unregisterdriver.c
ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y)
CSRCS += fs_registerblockdriver.c fs_unregisterblockdriver.c
CSRCS += fs_findblockdriver.c fs_openblockdriver.c fs_closeblockdriver.c
ifneq ($(CONFIG_DISABLE_PSEUDOFS_OPERATIONS),y)
CSRCS += fs_blockproxy.c
endif
endif # CONFIG_DISABLE_MOUNTPOINT
# Include driver build support

View File

@ -55,7 +55,8 @@
#include <nuttx/kmalloc.h>
#include <nuttx/drivers/drivers.h>
#if !defined(CONFIG_DISABLE_MOUNTPOINT)
#if !defined(CONFIG_DISABLE_MOUNTPOINT) && \
!defined(CONFIG_DISABLE_PSEUDOFS_OPERATIONS)
/****************************************************************************
* Private Data
@ -230,4 +231,4 @@ errout_with_chardev:
return ret;
}
#endif /* !CONFIG_DISABLE_MOUNTPOINT */
#endif /* !CONFIG_DISABLE_MOUNTPOINT && !CONFIG_DISABLE_PSEUDOFS_OPERATIONS */

View File

@ -140,7 +140,8 @@ int open(const char *path, int oflags, ...)
inode = desc.node;
DEBUGASSERT(inode != NULL);
#if !defined(CONFIG_DISABLE_MOUNTPOINT)
#if !defined(CONFIG_DISABLE_MOUNTPOINT) && \
!defined(CONFIG_DISABLE_PSEUDOFS_OPERATIONS)
/* If the inode is block driver, then we may return a character driver
* proxy for the block driver. block_proxy() will instantiate a BCH
* character driver wrapper around the block driver, open(), then