diff options
author | Denys Vlasenko | 2015-07-19 23:12:51 +0200 |
---|---|---|
committer | Denys Vlasenko | 2015-07-19 23:12:51 +0200 |
commit | ce193f809b32368796a3aacf2ac8ba277f4c102a (patch) | |
tree | 6528caca18ddaf19d1326329ee4ab83dcd46f1ee /e2fsprogs/old_e2fsprogs/e2p/iod.c | |
parent | d840c5d139cfa50fbe4f6f67c178b0edf0c690c8 (diff) | |
download | busybox-ce193f809b32368796a3aacf2ac8ba277f4c102a.zip busybox-ce193f809b32368796a3aacf2ac8ba277f4c102a.tar.gz |
Remove old_e2fsprogs/*
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'e2fsprogs/old_e2fsprogs/e2p/iod.c')
-rw-r--r-- | e2fsprogs/old_e2fsprogs/e2p/iod.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/e2fsprogs/old_e2fsprogs/e2p/iod.c b/e2fsprogs/old_e2fsprogs/e2p/iod.c deleted file mode 100644 index 23ab8d5..0000000 --- a/e2fsprogs/old_e2fsprogs/e2p/iod.c +++ /dev/null @@ -1,52 +0,0 @@ -/* vi: set sw=4 ts=4: */ -/* - * iod.c - Iterate a function on each entry of a directory - * - * Copyright (C) 1993, 1994 Remy Card <card@masi.ibp.fr> - * Laboratoire MASI, Institut Blaise Pascal - * Universite Pierre et Marie Curie (Paris VI) - * - * This file can be redistributed under the terms of the GNU Library General - * Public License - */ - -/* - * History: - * 93/10/30 - Creation - */ - -#include "e2p.h" -#include <unistd.h> -#include <stdlib.h> -#include <string.h> - -int iterate_on_dir (const char * dir_name, - int (*func) (const char *, struct dirent *, void *), - void * private) -{ - DIR * dir; - struct dirent *de, *dep; - int max_len, len; - - max_len = PATH_MAX + sizeof(struct dirent); - de = xmalloc(max_len+1); - memset(de, 0, max_len+1); - - dir = opendir (dir_name); - if (dir == NULL) { - free(de); - return -1; - } - while ((dep = readdir (dir))) { - len = sizeof(struct dirent); - if (len < dep->d_reclen) - len = dep->d_reclen; - if (len > max_len) - len = max_len; - memcpy(de, dep, len); - (*func) (dir_name, de, private); - } - free(de); - closedir(dir); - return 0; -} |