You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/05/08 13:20:58 UTC

[incubator-nuttx] 01/03: fs: Move inode_checkflags from include/nuttx/fs/fs.h to fs/inode/inode.h

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 4a3d28a957d85f342790c6ff97360ebd7251cf21
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon May 4 21:32:03 2020 +0800

    fs: Move inode_checkflags from include/nuttx/fs/fs.h to fs/inode/inode.h
    
    since this function is only used inside fs subsystem
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 fs/inode/inode.h      | 10 ++++++++++
 fs/vfs/fs_fdopen.c    |  2 ++
 include/nuttx/fs/fs.h | 10 ----------
 3 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/fs/inode/inode.h b/fs/inode/inode.h
index d3a1519..419b6a4 100644
--- a/fs/inode/inode.h
+++ b/fs/inode/inode.h
@@ -187,6 +187,16 @@ int inode_semtake(void);
 void inode_semgive(void);
 
 /****************************************************************************
+ * Name: inode_checkflags
+ *
+ * Description:
+ *   Check if the access described by 'oflags' is supported on 'inode'
+ *
+ ****************************************************************************/
+
+int inode_checkflags(FAR struct inode *inode, int oflags);
+
+/****************************************************************************
  * Name: inode_search
  *
  * Description:
diff --git a/fs/vfs/fs_fdopen.c b/fs/vfs/fs_fdopen.c
index 0a347a6..25a597e 100644
--- a/fs/vfs/fs_fdopen.c
+++ b/fs/vfs/fs_fdopen.c
@@ -49,6 +49,8 @@
 #include <nuttx/fs/fs.h>
 #include <nuttx/net/net.h>
 
+#include "inode/inode.h"
+
 /****************************************************************************
  * Private Functions
  ****************************************************************************/
diff --git a/include/nuttx/fs/fs.h b/include/nuttx/fs/fs.h
index b59319a..a1806be 100644
--- a/include/nuttx/fs/fs.h
+++ b/include/nuttx/fs/fs.h
@@ -679,16 +679,6 @@ int unregister_mtddriver(FAR const char *path);
 #endif
 
 /****************************************************************************
- * Name: inode_checkflags
- *
- * Description:
- *   Check if the access described by 'oflags' is supported on 'inode'
- *
- ****************************************************************************/
-
-int inode_checkflags(FAR struct inode *inode, int oflags);
-
-/****************************************************************************
  * Name: files_initlist
  *
  * Description: