From e74c247fafe39e1ad0de390b57b87477dc62ffca Mon Sep 17 00:00:00 2001 From: Gerhard Rieger Date: Sat, 16 Feb 2008 10:45:34 +0100 Subject: [PATCH] use FD_SETSIZE instead of 1024 as FD limit --- filan_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/filan_main.c b/filan_main.c index 32366a1..866b271 100644 --- a/filan_main.c +++ b/filan_main.c @@ -24,7 +24,7 @@ int main(int argc, const char *argv[]) { const char **arg1, *a; const char *filename = NULL, *waittimetxt; unsigned int m = 0; /* first FD (default) */ - unsigned int n = 1024; /* last excl.; this is default on my Linux */ + unsigned int n = FD_SETSIZE; /* last excl. */ unsigned int i; int style = 0; struct timespec waittime = { 0, 0 }; @@ -233,7 +233,7 @@ static void filan_usage(FILE *fd) { fputs(" -ls log to stderr (default if no other log)\n", fd); #endif fputs(" -i only analyze this fd\n", fd); - fputs(" -n analyze all fds from 0 up to fdnum-1 (default: 1024)\n", fd); + fprintf(fd, " -n analyze all fds from 0 up to fdnum-1 (default: %u)\n", FD_SETSIZE); fputs(" -s simple output with just type and socket address or path\n", fd); /* fputs(" -c alternate device visualization\n", fd);*/ fputs(" -f analyze file system entry\n", fd);