summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2024-03-04 19:59:16 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-03-05 16:28:05 +0100
commit8c5a89504ae58e5ca53acac97d5649496ff6b7ac (patch)
tree2985583cb01b0fc949660b30783b233926f465ad /include
parent8208b020c4d22b3fd02c32be4d1503a0dab8327f (diff)
downloadbarebox-8c5a89504ae58e5ca53acac97d5649496ff6b7ac.tar.gz
barebox-8c5a89504ae58e5ca53acac97d5649496ff6b7ac.tar.xz
fs: implement fdopendir and rewinddir
We will be using the incoming O_PATH support to implement the EFI file system protocol for when barebox acts as EFI loader. The protocol also requires being able to rewind iteration, so add support for that too. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240304190038.3486881-32-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/dirent.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/dirent.h b/include/dirent.h
index 6e77058d29..4f7ff2a5f9 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -14,13 +14,16 @@ typedef struct dir {
struct fs_driver *fsdrv;
struct dirent d;
void *priv; /* private data for the fs driver */
+ int fd;
struct path path;
struct list_head entries;
} DIR;
DIR *opendir(const char *pathname);
+DIR *fdopendir(int fd);
struct dirent *readdir(DIR *dir);
int unreaddir(DIR *dir, const struct dirent *d);
+int rewinddir(DIR *dir);
int closedir(DIR *dir);
#endif /* __DIRENT_H */