Merged in masayuki2009/nuttx.nuttx/fix_open_block_device (pull request #230)
Fix open() a block device with CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y Approved-by: Gregory Nutt
This commit is contained in:
commit
fd479b98b5
@ -44,11 +44,8 @@ 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
|
||||
|
||||
# Include driver build support
|
||||
|
||||
|
@ -118,8 +118,7 @@ int find_blockdriver(FAR const char *pathname, int mountflags,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(CONFIG_DISABLE_PSEUDOFS_OPERATIONS) && \
|
||||
!defined(CONFIG_DISABLE_MOUNTPOINT)
|
||||
#if !defined(CONFIG_DISABLE_MOUNTPOINT)
|
||||
int block_proxy(FAR const char *blkdev, int oflags);
|
||||
#endif
|
||||
|
||||
|
@ -55,8 +55,7 @@
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/drivers/drivers.h>
|
||||
|
||||
#if !defined(CONFIG_DISABLE_PSEUDOFS_OPERATIONS) && \
|
||||
!defined(CONFIG_DISABLE_MOUNTPOINT)
|
||||
#if !defined(CONFIG_DISABLE_MOUNTPOINT)
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
@ -231,4 +230,4 @@ errout_with_chardev:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_DISABLE_PSEUDOFS_OPERATIONS && !CONFIG_DISABLE_MOUNTPOINT */
|
||||
#endif /* !CONFIG_DISABLE_MOUNTPOINT */
|
||||
|
@ -140,8 +140,7 @@ int open(const char *path, int oflags, ...)
|
||||
inode = desc.node;
|
||||
DEBUGASSERT(inode != NULL);
|
||||
|
||||
#if !defined(CONFIG_DISABLE_PSEUDOFS_OPERATIONS) && \
|
||||
!defined(CONFIG_DISABLE_MOUNTPOINT)
|
||||
#if !defined(CONFIG_DISABLE_MOUNTPOINT)
|
||||
/* 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
|
||||
|
Loading…
Reference in New Issue
Block a user