From aa322cf19aba2ec086aacc131d3d321664c00ecf Mon Sep 17 00:00:00 2001 From: des Date: Mon, 18 Mar 2002 23:26:13 +0000 Subject: Bump the cutoff mark for comparing files from 8 MB to 16 MB. --- usr.bin/xinstall/xinstall.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr.bin/xinstall') 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 */ #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); -- cgit v1.1