diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-14 22:41:09 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-03-14 22:41:09 +0000 |
commit | 1df59ef5f64b5af480e4048e904f65d0682fc56b (patch) | |
tree | 9d9bab896ace384c17eb83026921f5e8218bae8c /nuttx/fs/fs_internal.h | |
parent | 78cbcfd2a16c0cf3763173ce0a14d656bede0135 (diff) | |
download | px4-nuttx-1df59ef5f64b5af480e4048e904f65d0682fc56b.tar.gz px4-nuttx-1df59ef5f64b5af480e4048e904f65d0682fc56b.tar.bz2 px4-nuttx-1df59ef5f64b5af480e4048e904f65d0682fc56b.zip |
Added opendir, readdir, closedir, etc.
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@62 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/fs_internal.h')
-rw-r--r-- | nuttx/fs/fs_internal.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/nuttx/fs/fs_internal.h b/nuttx/fs/fs_internal.h index a063335fb..111f56aae 100644 --- a/nuttx/fs/fs_internal.h +++ b/nuttx/fs/fs_internal.h @@ -42,6 +42,7 @@ #include <nuttx/config.h> #include <nuttx/fs.h> +#include <dirent.h> #include <nuttx/compiler.h> /************************************************************ @@ -54,6 +55,20 @@ * Public Types ************************************************************/ +/* The internal representation of type DIR is just a + * container for an inode reference and a dirent structure. + */ + +struct internal_dir_s +{ + struct inode *root; /* The start inode (in case we + * rewind) */ + struct inode *next; /* The inode to use for the next call + * to readdir() */ + struct dirent dir; /* Populated using inode when readdir + * is called */ +}; + /************************************************************ * Global Variables ************************************************************/ @@ -74,8 +89,29 @@ extern "C" { /* fs_inode.c ***********************************************/ +EXTERN void inode_semtake(void); +EXTERN void inode_semgive(void); +EXTERN FAR struct inode *inode_search(const char **path, + FAR struct inode **peer, + FAR struct inode **parent); +EXTERN void inode_free(FAR struct inode *node); +EXTERN const char *inode_nextname(const char *name); + + +/* fs_inodefind.c ********************************************/ + EXTERN FAR struct inode *inode_find(const char *path); + +/* fs_inodefinddir.c *****************************************/ + +EXTERN FAR struct inode *inode_finddir(const char *path); + +/* fs_inodeaddref.c ******************************************/ + EXTERN void inode_addref(FAR struct inode *inode); + +/* fs_inoderelease.c *****************************************/ + EXTERN void inode_release(FAR struct inode *inode); /* fs_files.c ***********************************************/ |