fs/directory: update readdir interface for all filesystem

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong
2022-07-26 06:56:41 +00:00
committed by Xiang Xiao
parent 3a70962b7a
commit 90db4daca9
30 changed files with 244 additions and 205 deletions
-6
View File
@@ -321,12 +321,6 @@ struct fs_dirent_s
#endif
#endif /* !CONFIG_DISABLE_MOUNTPOINT */
} u;
/* In any event, this the actual struct dirent that is returned by
* readdir
*/
struct dirent fd_dir; /* Populated when readdir is called */
};
/****************************************************************************
+2 -1
View File
@@ -33,6 +33,7 @@
#include <stdint.h>
#include <stdbool.h>
#include <time.h>
#include <dirent.h>
#include <nuttx/mutex.h>
#include <nuttx/semaphore.h>
@@ -305,7 +306,7 @@ struct mountpt_operations
int (*closedir)(FAR struct inode *mountpt,
FAR struct fs_dirent_s *dir);
int (*readdir)(FAR struct inode *mountpt,
FAR struct fs_dirent_s *dir);
FAR struct fs_dirent_s *dir, FAR struct dirent *entry);
int (*rewinddir)(FAR struct inode *mountpt,
FAR struct fs_dirent_s *dir);
+1 -1
View File
@@ -75,7 +75,7 @@ struct procfs_operations
int (*opendir)(FAR const char *relpath,
FAR struct fs_dirent_s *dir);
int (*closedir)(FAR struct fs_dirent_s *dir);
int (*readdir)(FAR struct fs_dirent_s *dir);
int (*readdir)(FAR struct fs_dirent_s *dir, FAR struct dirent *entry);
int (*rewinddir)(FAR struct fs_dirent_s *dir);
/* Operations on paths */