move iterate_on_dir() from e2fsprogs to libbb

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2021-06-24 11:42:55 +02:00
parent 87c40cf4de
commit 1746218bee
4 changed files with 33 additions and 32 deletions

View File

@ -512,6 +512,11 @@ int recursive_action(const char *fileName, unsigned flags,
void *userData
) FAST_FUNC;
/* Simpler version: call a function on each dirent in a directory */
int iterate_on_dir(const char *dir_name,
int FAST_FUNC (*func)(const char *, struct dirent *, void *),
void *private) FAST_FUNC;
extern int device_open(const char *device, int mode) FAST_FUNC;
enum { GETPTY_BUFSIZE = 16 }; /* more than enough for "/dev/ttyXXX" */
extern int xgetpty(char *line) FAST_FUNC;