Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions drivers/bch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,10 @@ config BCH_BUFFER_ALIGNMENT
int "Buffer aligned bytes"
default 0

config BCH_DEVICE_READONLY
bool "Set BCH device readonly"
default n
---help---
Set bch devices read-only

endif # BCH
4 changes: 4 additions & 0 deletions fs/vfs/fs_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,11 @@ static int file_vopen(FAR struct file *filep, FAR const char *path,

/* Get the file structure of the opened character driver proxy */

#ifdef CONFIG_BCH_DEVICE_READONLY
ret = block_proxy(filep, path, O_RDOK);
#else
ret = block_proxy(filep, path, oflags);
#endif
#ifdef CONFIG_FS_NOTIFY
if (ret >= 0)
{
Expand Down