aboutsummaryrefslogtreecommitdiffstats
path: root/src/msec_find/find.c
diff options
context:
space:
mode:
authorYoann Vandoorselaere <yoann@mandriva.com>2000-04-18 16:32:29 +0000
committerYoann Vandoorselaere <yoann@mandriva.com>2000-04-18 16:32:29 +0000
commit7838530faed4e5d7644c5dd0ed2275b27081a0ea (patch)
tree3d67a5a71e7820d35596b2502169850602506e2d /src/msec_find/find.c
parent95a10e8e5b0001713560965bcd1de2ee1be308ae (diff)
downloadmsec-7838530faed4e5d7644c5dd0ed2275b27081a0ea.tar
msec-7838530faed4e5d7644c5dd0ed2275b27081a0ea.tar.gz
msec-7838530faed4e5d7644c5dd0ed2275b27081a0ea.tar.bz2
msec-7838530faed4e5d7644c5dd0ed2275b27081a0ea.tar.xz
msec-7838530faed4e5d7644c5dd0ed2275b27081a0ea.zip
*** empty log message ***
Diffstat (limited to 'src/msec_find/find.c')
-rw-r--r--src/msec_find/find.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/msec_find/find.c b/src/msec_find/find.c
index 6b20fb0..b1fb2d2 100644
--- a/src/msec_find/find.c
+++ b/src/msec_find/find.c
@@ -169,19 +169,18 @@ int main(int argc, char **argv)
char *directory;
int res = 0, i;
int ctrl = 0;
-
+
if ( argc < 2 ) {
fprintf(stderr, "Please give directory as argument.\n");
fprintf(stderr, "%s /usr/sbin /sbin\n\n", argv[0]);
exit(1);
}
-
+
/* open all log files */
init();
- for ( i = 0; i < argc; i++ ) {
-
- if (strcmp(argv[0], "/") != 0) {
+ for ( i = 1; i < argc; i++ ) {
+ if ( strcmp(argv[i], "/") != 0) {
/*
* We need to add a final '/' to the base directory name else the
* FTW_MOUNT option of nftw won't work. i.e. : /mnt/cdrom is on the /
@@ -201,7 +200,7 @@ int main(int argc, char **argv)
strcat(directory, "/");
} else directory = argv[i];
- res = nftw(directory, traverse, (int) 500, FTW_PHYS | FTW_MOUNT | FTW_CHDIR);
+ res = nftw(directory, traverse, 200, FTW_PHYS | FTW_MOUNT | FTW_CHDIR);
if ( ctrl ) {
free(directory);
ctrl = 0;