fs: try blockproxy only if BCH is enabled

This commit is contained in:
YAMAMOTO Takashi 2021-03-15 13:52:52 +09:00 committed by Xiang Xiao
parent 39b3998149
commit 5652de3fdf
2 changed files with 4 additions and 1 deletions

View File

@ -35,9 +35,11 @@ CSRCS += fs_mtdpartition.c
endif
endif
ifeq ($(CONFIG_BCH),y)
ifneq ($(CONFIG_DISABLE_PSEUDOFS_OPERATIONS),y)
CSRCS += fs_blockproxy.c
endif
endif # CONFIG_BCH
endif # CONFIG_DISABLE_MOUNTPOINT
# Include driver build support

View File

@ -94,7 +94,8 @@ static int file_vopen(FAR struct file *filep,
inode = desc.node;
DEBUGASSERT(inode != NULL);
#if !defined(CONFIG_DISABLE_MOUNTPOINT) && \
#if defined(CONFIG_BCH) && \
!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