diff options
author | Jim Meyering <jim@meyering.net> | 2003-02-01 15:20:36 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-02-01 15:20:36 +0000 |
commit | d606b4759829e44f3c03aaa0d46ad67c1136a1a5 (patch) | |
tree | 01a760b5cc6a7afd18418d2b0c2fa6bc7892f26c /src | |
parent | 07d3a99375fb754c8d51a83539e60fe5bc465234 (diff) | |
download | coreutils-d606b4759829e44f3c03aaa0d46ad67c1136a1a5.tar.xz |
(MAX_N_DESCRIPTORS): Define.
Diffstat (limited to 'src')
-rw-r--r-- | src/du.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -51,8 +51,12 @@ /* Initial size of the hash table. */ #define INITIAL_TABLE_SIZE 103 -/* Initial size to allocate for `path'. */ -#define INITIAL_PATH_SIZE 100 +/* The maximum number of simultaneously open file handles that + may be used by ftw. */ +#define MAX_N_DESCRIPTORS \ + (UTILS_OPEN_MAX < 20 \ + ? UTILS_OPEN_MAX \ + : UTILS_OPEN_MAX - 10) /* Hash structure for inode and device numbers. The separate entry structure makes it easier to rehash "in place". */ @@ -515,7 +519,6 @@ du_files (char **files, int ftw_flags) file = new_file; } -#define MAX_N_DESCRIPTORS (1000 - 1) /* FIXME-compute at configure time */ err = nftw (file, process_file, MAX_N_DESCRIPTORS, ftw_flags); if (err) error (0, errno, "%s", quote (orig)); |