diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-08-04 18:24:11 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-08-04 18:24:11 +0000 |
commit | 2e50cf9265b9d7a92e4b7cf734048d123034168e (patch) | |
tree | 3fa1f2642e194c6bd15aeba41d831dd40b3272c1 /usr.bin/tail | |
parent | ed5365f1bc90c57b7b7d4e35e642918be83026a8 (diff) |
supply particular mapping type to the mmap(2) instead of bogus 0
Diffstat (limited to 'usr.bin/tail')
-rw-r--r-- | usr.bin/tail/forward.c | 8 | ||||
-rw-r--r-- | usr.bin/tail/reverse.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/tail/forward.c b/usr.bin/tail/forward.c index f77edd00a6f..d23f6dfe4d0 100644 --- a/usr.bin/tail/forward.c +++ b/usr.bin/tail/forward.c @@ -1,4 +1,4 @@ -/* $OpenBSD: forward.c,v 1.7 1999/02/03 02:09:30 millert Exp $ */ +/* $OpenBSD: forward.c,v 1.8 1999/08/04 18:24:10 mickey Exp $ */ /* $NetBSD: forward.c,v 1.7 1996/02/13 16:49:10 ghudson Exp $ */ /*- @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)forward.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: forward.c,v 1.7 1999/02/03 02:09:30 millert Exp $"; +static char rcsid[] = "$OpenBSD: forward.c,v 1.8 1999/08/04 18:24:10 mickey Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -217,8 +217,8 @@ rlines(fp, off, sbp) if (size > SIZE_T_MAX) return (1); - if ((start = mmap(NULL, (size_t)size, PROT_READ, 0, fileno(fp), - (off_t)0)) == (caddr_t)-1) + if ((start = mmap(NULL, (size_t)size, PROT_READ, MAP_PRIVATE, + fileno(fp), (off_t)0)) == (caddr_t)-1) return (1); /* Last char is special, ignore whether newline or not. */ diff --git a/usr.bin/tail/reverse.c b/usr.bin/tail/reverse.c index 06c181bf3fa..927dfb1db95 100644 --- a/usr.bin/tail/reverse.c +++ b/usr.bin/tail/reverse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: reverse.c,v 1.5 1999/04/29 04:18:43 mickey Exp $ */ +/* $OpenBSD: reverse.c,v 1.6 1999/08/04 18:24:10 mickey Exp $ */ /* $NetBSD: reverse.c,v 1.6 1994/11/23 07:42:10 jtc Exp $ */ /*- @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)reverse.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: reverse.c,v 1.5 1999/04/29 04:18:43 mickey Exp $"; +static char rcsid[] = "$OpenBSD: reverse.c,v 1.6 1999/08/04 18:24:10 mickey Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -126,8 +126,8 @@ r_reg(fp, style, off, sbp) if (size > SIZE_T_MAX) return (1); - if ((start = mmap(NULL, (size_t)size, PROT_READ, 0, fileno(fp), - (off_t)0)) == (caddr_t)-1) + if ((start = mmap(NULL, (size_t)size, PROT_READ, MAP_PRIVATE, + fileno(fp), (off_t)0)) == (caddr_t)-1) return (1); p = start + size - 1; |