diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-14 14:24:30 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-14 14:24:30 +0000 |
commit | 3a6755f56f811f246934f02182531fb1e8ccc72d (patch) | |
tree | 3bcbe0186fd69f665ed3634dc2f990f994ec399f /libbb | |
parent | c345d8e94589e3c74a9fac40f440affbc359c8d1 (diff) | |
download | busybox-3a6755f56f811f246934f02182531fb1e8ccc72d.tar.gz |
grep: add support for -r
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/recursive_action.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libbb/recursive_action.c b/libbb/recursive_action.c index 28a493403..6949e34f3 100644 --- a/libbb/recursive_action.c +++ b/libbb/recursive_action.c @@ -46,14 +46,14 @@ int recursive_action(const char *fileName, return FALSE; } - if (! followLinks && (S_ISLNK(statbuf.st_mode))) { + if (!followLinks && (S_ISLNK(statbuf.st_mode))) { if (fileAction == NULL) return TRUE; else return fileAction(fileName, &statbuf, userData); } - if (! recurse) { + if (!recurse) { if (S_ISDIR(statbuf.st_mode)) { if (dirAction != NULL) return (dirAction(fileName, &statbuf, userData)); @@ -65,9 +65,9 @@ int recursive_action(const char *fileName, if (S_ISDIR(statbuf.st_mode)) { DIR *dir; - if (dirAction != NULL && ! depthFirst) { + if (dirAction != NULL && !depthFirst) { status = dirAction(fileName, &statbuf, userData); - if (! status) { + if (!status) { bb_perror_msg("%s", fileName); return FALSE; } else if (status == SKIP) @@ -84,7 +84,7 @@ int recursive_action(const char *fileName, nextFile = concat_subpath_file(fileName, next->d_name); if(nextFile == NULL) continue; - if (! recursive_action(nextFile, TRUE, followLinks, depthFirst, + if (!recursive_action(nextFile, TRUE, followLinks, depthFirst, fileAction, dirAction, userData)) { status = FALSE; } @@ -92,12 +92,12 @@ int recursive_action(const char *fileName, } closedir(dir); if (dirAction != NULL && depthFirst) { - if (! dirAction(fileName, &statbuf, userData)) { + if (!dirAction(fileName, &statbuf, userData)) { bb_perror_msg("%s", fileName); return FALSE; } } - if (! status) + if (!status) return FALSE; } else { if (fileAction == NULL) |