summaryrefslogtreecommitdiff
path: root/nuttx/fs/fs_open.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/fs/fs_open.c')
-rw-r--r--nuttx/fs/fs_open.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nuttx/fs/fs_open.c b/nuttx/fs/fs_open.c
index 3561d2be0..e954fb743 100644
--- a/nuttx/fs/fs_open.c
+++ b/nuttx/fs/fs_open.c
@@ -76,6 +76,7 @@ int open(const char *path, int oflags, ...)
{
struct filelist *list;
FAR struct inode *inode;
+ mode_t mode = 0666;
int status;
int fd;
@@ -90,7 +91,6 @@ int open(const char *path, int oflags, ...)
#ifdef CONFIG_FILE_MODE
# warning "File creation not implemented"
- mode_t mode = 0;
/* If the file is opened for creation, then get the mode bits */
@@ -153,7 +153,8 @@ int open(const char *path, int oflags, ...)
{
if (INODE_IS_MOUNTPT(inode))
{
- status = inode->u.i_mops->open((FAR struct file*)&list->fl_files[fd], relpath);
+ status = inode->u.i_mops->open((FAR struct file*)&list->fl_files[fd],
+ relpath, oflags, mode);
}
else
{