From 7876018f73330338c029fa0ec32e59367354a123 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Mon, 10 Oct 2022 08:14:37 +0200 Subject: fs: implement unreaddir When iterating over a directory, it can be useful to put back the just read directory entry, so it can be retried at a later time. This will be needed for the EFI loader variable support. Signed-off-by: Ahmad Fatoum Link: https://lore.barebox.org/20221010061437.2085412-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer --- include/dirent.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/dirent.h b/include/dirent.h index 61a76c5b59..285074e9f7 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -18,6 +18,7 @@ typedef struct dir { DIR *opendir(const char *pathname); struct dirent *readdir(DIR *dir); +int unreaddir(DIR *dir, const struct dirent *d); int closedir(DIR *dir); #endif /* __DIRENT_H */ -- cgit v1.2.3