From 5652de3fdf7acc64acb754907c361e4c6f6bbb82 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Mon, 15 Mar 2021 13:52:52 +0900 Subject: [PATCH] fs: try blockproxy only if BCH is enabled --- fs/driver/Make.defs | 2 ++ fs/vfs/fs_open.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/driver/Make.defs b/fs/driver/Make.defs index 70f68b580b..e34f437781 100644 --- a/fs/driver/Make.defs +++ b/fs/driver/Make.defs @@ -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 diff --git a/fs/vfs/fs_open.c b/fs/vfs/fs_open.c index f6cbc78a04..3619f4f409 100644 --- a/fs/vfs/fs_open.c +++ b/fs/vfs/fs_open.c @@ -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