aboutsummaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>1999-10-22 05:12:14 +0000
committerEric Andersen <andersen@codepoet.org>1999-10-22 05:12:14 +0000
commit63a0e530bd535cff8bc56cb51258102285581046 (patch)
tree4d4462cbeb705e91a726b7de7f801270c19e7a0e /utility.c
parentaa0765e11bdeba5c5abf745369a8430c8311d60c (diff)
downloadbusybox-63a0e530bd535cff8bc56cb51258102285581046.tar.gz
Cosmetic adjustments.
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/utility.c b/utility.c
index eb24de2e6..a653bb325 100644
--- a/utility.c
+++ b/utility.c
@@ -381,10 +381,12 @@ int fullRead(int fd, char *buf, int len)
* location, and do something (something specified
* by the fileAction and dirAction function pointers).
*
- * TODO: check if ftw(3) can replace this to reduce code size...
+ * Unfortunatly, while nftw(3) could replace this and reduce
+ * code size a bit, nftw() wasn't supported before GNU libc 2.1,
+ * and so isn't sufficiently portable to take over...
*/
int
-recursiveAction(const char *fileName, int recurse, int followLinks, int delayDirAction,
+recursiveAction(const char *fileName, int recurse, int followLinks, int depthFirst,
int (*fileAction) (const char *fileName, struct stat* statbuf),
int (*dirAction) (const char *fileName, struct stat* statbuf))
{
@@ -418,7 +420,7 @@ recursiveAction(const char *fileName, int recurse, int followLinks, int delayDir
perror(fileName);
return (FALSE);
}
- if (dirAction != NULL && delayDirAction == FALSE) {
+ if (dirAction != NULL && depthFirst == FALSE) {
status = dirAction(fileName, &statbuf);
if (status == FALSE) {
perror(fileName);
@@ -433,7 +435,7 @@ recursiveAction(const char *fileName, int recurse, int followLinks, int delayDir
}
sprintf(nextFile, "%s/%s", fileName, next->d_name);
status =
- recursiveAction(nextFile, TRUE, followLinks, delayDirAction,
+ recursiveAction(nextFile, TRUE, followLinks, depthFirst,
fileAction, dirAction);
if (status < 0) {
closedir(dir);
@@ -445,7 +447,7 @@ recursiveAction(const char *fileName, int recurse, int followLinks, int delayDir
perror(fileName);
return (FALSE);
}
- if (dirAction != NULL && delayDirAction == TRUE) {
+ if (dirAction != NULL && depthFirst == TRUE) {
status = dirAction(fileName, &statbuf);
if (status == FALSE) {
perror(fileName);