summaryrefslogtreecommitdiff
path: root/findutils/find.c
diff options
context:
space:
mode:
Diffstat (limited to 'findutils/find.c')
-rw-r--r--findutils/find.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/findutils/find.c b/findutils/find.c
index c154cf4..ab9ebf4 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -42,34 +42,11 @@ static int fileAction(const char *fileName, struct stat* statbuf)
{
if (pattern==NULL)
fprintf(stdout, "%s\n", fileName);
- else if (find_match(fileName, pattern, TRUE) == TRUE)
+ else if (find_match((char*)fileName, pattern, TRUE) == TRUE)
fprintf(stdout, "%s\n", fileName);
return( TRUE);
}
-static int dirAction(const char *fileName, struct stat* statbuf)
-{
- DIR *dir;
- struct dirent *entry;
-
- if (pattern==NULL)
- fprintf(stdout, "%s\n", fileName);
- else if (find_match(fileName, pattern, TRUE) == TRUE)
- fprintf(stdout, "%s\n", fileName);
-
- dir = opendir( fileName);
- if (!dir) {
- perror("Can't open directory");
- exit(FALSE);
- }
- while ((entry = readdir(dir)) != NULL) {
- char dirName[NAME_MAX];
- sprintf(dirName, "%s/%s", fileName, entry->d_name);
- recursiveAction( dirName, TRUE, dereferenceFlag, FALSE, fileAction, dirAction);
- }
- return( TRUE);
-}
-
int find_main(int argc, char **argv)
{
/* peel off the "find" */