summaryrefslogtreecommitdiffstats
path: root/usr.bin/xinstall
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1998-01-11 11:43:36 +0000
committerpeter <peter@FreeBSD.org>1998-01-11 11:43:36 +0000
commit85d8c8dd5194daca0deb053ad381b8ecd32f99be (patch)
treed1c65c63f62014202de16a32ce9c7bb900fab501 /usr.bin/xinstall
parentd3fd83d6ba385f006fb18aa06eae5594e7e2130f (diff)
downloadFreeBSD-src-85d8c8dd5194daca0deb053ad381b8ecd32f99be.zip
FreeBSD-src-85d8c8dd5194daca0deb053ad381b8ecd32f99be.tar.gz
Add an option (-M) to install to disable use of mmap(2). This is kinda
handy at the moment with -current's mmap+unlink interactions.. The problems seem worst when using INSTALL="install -C" in /etc/make.conf. This could well come in handy in the future too.
Diffstat (limited to 'usr.bin/xinstall')
-rw-r--r--usr.bin/xinstall/install.110
-rw-r--r--usr.bin/xinstall/xinstall.c11
2 files changed, 14 insertions, 7 deletions
diff --git a/usr.bin/xinstall/install.1 b/usr.bin/xinstall/install.1
index 6d06e49..2ebe83f 100644
--- a/usr.bin/xinstall/install.1
+++ b/usr.bin/xinstall/install.1
@@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" From: @(#)install.1 8.1 (Berkeley) 6/6/93
-.\" $Id: install.1,v 1.9 1997/02/22 19:57:54 peter Exp $
+.\" $Id: install.1,v 1.10 1997/08/27 06:29:23 charnier Exp $
.\"
.Dd September 22, 1996
.Dt INSTALL 1
@@ -40,14 +40,14 @@
.Nd install binaries
.Sh SYNOPSIS
.Nm install
-.Op Fl CcDps
+.Op Fl CcDMps
.Op Fl f Ar flags
.Op Fl g Ar group
.Op Fl m Ar mode
.Op Fl o Ar owner
.Ar file1 file2
.Nm install
-.Op Fl CcDps
+.Op Fl CcDMps
.Op Fl f Ar flags
.Op Fl g Ar group
.Op Fl m Ar mode
@@ -107,6 +107,9 @@ Specify the target's file flags; see
for a list of possible flags and their meanings.
.It Fl g
Specify a group. A numeric GID is allowed.
+.It Fl M
+Disable all use of
+.Xr mmap 2 .
.It Fl m
Specify an alternate mode.
The default mode is set to rwxr-xr-x (0755).
@@ -162,6 +165,7 @@ are created in the target directory.
.Xr cp 1 ,
.Xr mv 1 ,
.Xr strip 1 ,
+.Xr mmap 2 ,
.Xr chown 8
.Sh HISTORY
The
diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c
index 607d7ad..a4a1bed 100644
--- a/usr.bin/xinstall/xinstall.c
+++ b/usr.bin/xinstall/xinstall.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "From: @(#)xinstall.c 8.1 (Berkeley) 7/21/93";
#endif
static const char rcsid[] =
- "$Id: xinstall.c,v 1.27 1997/10/28 14:20:10 ache Exp $";
+ "$Id: xinstall.c,v 1.28 1998/01/09 06:05:13 jb Exp $";
#endif /* not lint */
/*-
@@ -87,7 +87,7 @@ static const char rcsid[] =
#define MAP_FAILED ((caddr_t)-1) /* from <sys/mman.h> */
#endif
-int debug, docompare, docopy, dodir, dopreserve, dostrip, verbose;
+int debug, docompare, docopy, dodir, dopreserve, dostrip, verbose, nommap;
int mode = S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH;
char *group, *owner, pathbuf[MAXPATHLEN];
char pathbuf2[MAXPATHLEN];
@@ -136,7 +136,7 @@ main(argc, argv)
char *flags, *to_name;
iflags = 0;
- while ((ch = getopt(argc, argv, "CcdDf:g:m:o:psv")) != -1)
+ while ((ch = getopt(argc, argv, "CcdDf:g:m:Mo:psv")) != -1)
switch((char)ch) {
case 'C':
docompare = docopy = 1;
@@ -165,6 +165,9 @@ main(argc, argv)
optarg);
mode = getmode(set, 0);
break;
+ case 'M':
+ nommap = 1;
+ break;
case 'o':
owner = optarg;
break;
@@ -711,7 +714,7 @@ trymmap(fd)
{
struct statfs stfs;
- if (fstatfs(fd, &stfs) < 0)
+ if (nommap || fstatfs(fd, &stfs) < 0)
return 0;
/* NetBSD MOUNT_XXX defines are strings, but doesn't have a MOUNT_NONE. */
OpenPOWER on IntegriCloud