summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1998-11-18 11:47:45 +0000
committerBruce Evans <bde@FreeBSD.org>1998-11-18 11:47:45 +0000
commit40fc4ee2decdfdd7fe4d748b8cac2063d510f2d0 (patch)
tree7e2ef848a7d9a1f6a3a7d9c7c7cd1bac1663064d /bin
parent4f699173cb6857c91138afda709896a50200f434 (diff)
Notes
Diffstat (limited to 'bin')
-rw-r--r--bin/cp/utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c
index 7e001b2abbff..f6c0f0d21d55 100644
--- a/bin/cp/utils.c
+++ b/bin/cp/utils.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)utils.c 8.3 (Berkeley) 4/1/94";
#endif
static const char rcsid[] =
- "$Id: utils.c,v 1.19 1998/06/09 03:38:26 imp Exp $";
+ "$Id: utils.c,v 1.20 1998/06/10 06:29:23 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -124,7 +124,7 @@ copy_file(entp, dne)
* wins some CPU back.
*/
#ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
- if (fs->st_size <= 8 * 1048576) {
+ if (S_ISREG(fs->st_mode) && fs->st_size <= 8 * 1048576) {
if ((p = mmap(NULL, (size_t)fs->st_size, PROT_READ,
MAP_SHARED, from_fd, (off_t)0)) == MAP_FAILED) {
warn("%s", entp->fts_path);