* is so stinking huge.
*/
-static int true_action(const char *fileName ATTRIBUTE_UNUSED,
- struct stat *statbuf ATTRIBUTE_UNUSED,
- void* userData ATTRIBUTE_UNUSED,
- int depth ATTRIBUTE_UNUSED)
+static int FAST_FUNC true_action(const char *fileName UNUSED_PARAM,
+ struct stat *statbuf UNUSED_PARAM,
+ void* userData UNUSED_PARAM,
+ int depth UNUSED_PARAM)
{
return TRUE;
}
* 1: stat(statbuf). Calls dirAction and optionally recurse on link to dir.
*/
-int recursive_action(const char *fileName,
+int FAST_FUNC recursive_action(const char *fileName,
unsigned flags,
- int (*fileAction)(const char *fileName, struct stat *statbuf, void* userData, int depth),
- int (*dirAction)(const char *fileName, struct stat *statbuf, void* userData, int depth),
+ int FAST_FUNC (*fileAction)(const char *fileName, struct stat *statbuf, void* userData, int depth),
+ int FAST_FUNC (*dirAction)(const char *fileName, struct stat *statbuf, void* userData, int depth),
void* userData,
unsigned depth)
{
if (!recursive_action(nextFile, flags, fileAction, dirAction,
userData, depth + 1))
status = FALSE;
+// s = recursive_action(nextFile, flags, fileAction, dirAction,
+// userData, depth + 1);
free(nextFile);
+//#define RECURSE_RESULT_ABORT 3
+// if (s == RECURSE_RESULT_ABORT) {
+// closedir(dir);
+// return s;
+// }
+// if (s == FALSE)
+// status = FALSE;
}
closedir(dir);
return status;
done_nak_warn:
- bb_simple_perror_msg(fileName);
+ if (!(flags & ACTION_QUIET))
+ bb_simple_perror_msg(fileName);
return FALSE;
}