diff options
author | Denys Vlasenko | 2021-06-24 11:42:55 +0200 |
---|---|---|
committer | Denys Vlasenko | 2021-06-24 11:42:55 +0200 |
commit | 1746218beebc7e180f3eaed905277f9f46983ac4 (patch) | |
tree | f3649cc92207d437b9ce2b635e22a13154978a3e /e2fsprogs/e2fs_lib.c | |
parent | 87c40cf4de435d1b19b7fb545a495542c6eaf820 (diff) | |
download | busybox-1746218beebc7e180f3eaed905277f9f46983ac4.zip busybox-1746218beebc7e180f3eaed905277f9f46983ac4.tar.gz |
move iterate_on_dir() from e2fsprogs to libbb
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'e2fsprogs/e2fs_lib.c')
-rw-r--r-- | e2fsprogs/e2fs_lib.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/e2fsprogs/e2fs_lib.c b/e2fsprogs/e2fs_lib.c index e32336a..9b68d89 100644 --- a/e2fsprogs/e2fs_lib.c +++ b/e2fsprogs/e2fs_lib.c @@ -8,33 +8,6 @@ #include "libbb.h" #include "e2fs_lib.h" -#if INT_MAX == LONG_MAX -#define IF_LONG_IS_SAME(...) __VA_ARGS__ -#define IF_LONG_IS_WIDER(...) -#else -#define IF_LONG_IS_SAME(...) -#define IF_LONG_IS_WIDER(...) __VA_ARGS__ -#endif - -/* Iterate a function on each entry of a directory */ -int iterate_on_dir(const char *dir_name, - int FAST_FUNC (*func)(const char *, struct dirent *, void *), - void *private) -{ - DIR *dir; - struct dirent *de; - - dir = opendir(dir_name); - if (dir == NULL) { - return -1; - } - while ((de = readdir(dir)) != NULL) { - func(dir_name, de, private); - } - closedir(dir); - return 0; -} - /* Print file attributes on an ext2 file system */ const uint32_t e2attr_flags_value[] ALIGN4 = { #ifdef ENABLE_COMPRESSION |