From 7838530faed4e5d7644c5dd0ed2275b27081a0ea Mon Sep 17 00:00:00 2001 From: Yoann Vandoorselaere Date: Tue, 18 Apr 2000 16:32:29 +0000 Subject: *** empty log message *** --- src/msec_find/find.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/msec_find') 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; -- cgit v1.2.1