diff options
author | des <des@FreeBSD.org> | 2002-03-18 23:26:13 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2002-03-18 23:26:13 +0000 |
commit | aa322cf19aba2ec086aacc131d3d321664c00ecf (patch) | |
tree | 3b7ce25f7ea2f53670816133ded56c2a626f4784 /usr.bin | |
parent | ffc925e36bb3305026b6b62c662cef4574c3afcc (diff) | |
download | FreeBSD-src-aa322cf19aba2ec086aacc131d3d321664c00ecf.zip FreeBSD-src-aa322cf19aba2ec086aacc131d3d321664c00ecf.tar.gz |
Bump the cutoff mark for comparing files from 8 MB to 16 MB.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/xinstall/xinstall.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index 23dde6d..7135d0c 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -74,6 +74,8 @@ static const char sccsid[] = "From: @(#)xinstall.c 8.1 (Berkeley) 7/21/93"; #define MAP_FAILED ((void *)-1) /* from <sys/mman.h> */ #endif +#define MAX_CMP_SIZE (16 * 1024 * 1024) + #define DIRECTORY 0x01 /* Tell install it's a directory. */ #define SETFLAGS 0x02 /* Tell install to set flags. */ #define NOCHANGEBITS (UF_IMMUTABLE | UF_APPEND | SF_IMMUTABLE | SF_APPEND) @@ -528,7 +530,7 @@ compare(int from_fd, const char *from_name __unused, size_t from_len, if (from_len != to_len) return 1; - if (from_len <= 8 * 1024 * 1024) { + if (from_len <= MAX_CMP_SIZE) { done_compare = 0; if (trymmap(from_fd) && trymmap(to_fd)) { p = mmap(NULL, from_len, PROT_READ, MAP_SHARED, from_fd, (off_t)0); |