[Midnightbsd-cvs] src [11107] trunk/sbin/mount_unionfs/mount_unionfs.c: sync
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Tue Jun 19 14:40:51 EDT 2018
Revision: 11107
http://svnweb.midnightbsd.org/src/?rev=11107
Author: laffer1
Date: 2018-06-19 14:40:34 -0400 (Tue, 19 Jun 2018)
Log Message:
-----------
sync
Modified Paths:
--------------
trunk/sbin/mount_unionfs/Makefile
trunk/sbin/mount_unionfs/mount_unionfs.8
trunk/sbin/mount_unionfs/mount_unionfs.c
Property Changed:
----------------
trunk/sbin/mount_unionfs/mount_unionfs.8
Modified: trunk/sbin/mount_unionfs/Makefile
===================================================================
--- trunk/sbin/mount_unionfs/Makefile 2018-06-19 18:30:07 UTC (rev 11106)
+++ trunk/sbin/mount_unionfs/Makefile 2018-06-19 18:40:34 UTC (rev 11107)
@@ -1,5 +1,6 @@
+# $MidnightBSD$
# @(#)Makefile 8.3 (Berkeley) 3/27/94
-# $MidnightBSD$
+# $FreeBSD: stable/10/sbin/mount_unionfs/Makefile 198236 2009-10-19 16:00:24Z ru $
PROG= mount_unionfs
SRCS= mount_unionfs.c getmntopts.c
Modified: trunk/sbin/mount_unionfs/mount_unionfs.8
===================================================================
--- trunk/sbin/mount_unionfs/mount_unionfs.8 2018-06-19 18:30:07 UTC (rev 11106)
+++ trunk/sbin/mount_unionfs/mount_unionfs.8 2018-06-19 18:40:34 UTC (rev 11107)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
.\" Copyright (c) 1994
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -29,9 +30,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)mount_union.8 8.6 (Berkeley) 3/27/94
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/sbin/mount_unionfs/mount_unionfs.8 307408 2016-10-16 22:31:51Z sevan $
.\"
-.Dd November 30, 2006
+.Dd October 3, 2016
.Dt MOUNT_UNIONFS 8
.Os
.Sh NAME
@@ -83,7 +84,7 @@
However,
.Ar uniondir
remains the mount point.
-.It Sm Cm copymode No = Cm traditional | transparent | masquerade Sm
+.It Cm copymode No = Cm traditional | transparent | masquerade
Specifies the way to create a file or a directory in the upper layer
automatically when needed.
The
@@ -98,7 +99,7 @@
mode, see
.Sx MASQUERADE MODE
below.
-.It Sm Cm whiteout No = Cm always | whenneeded Sm
+.It Cm whiteout No = Cm always | whenneeded
Specifies whether whiteouts should always be made in the upper layer
when removing a file or directory or only when it already exists in the
lower layer.
@@ -328,9 +329,13 @@
.Xr mount_nullfs 8
.Sh HISTORY
The
-.Nm
+.Nm mount_null
utility first appeared in
.Bx 4.4 .
+It was renamed to
+.Nm
+in
+.Fx 5.0 .
.Pp
The
.Fl r
@@ -342,9 +347,9 @@
.An -nosplit
In
.Fx 7.0 ,
-.An Masanori OZAWA Aq ozawa at ongs.co.jp
+.An Masanori OZAWA Aq Mt ozawa at ongs.co.jp
reimplemented handling of locking, whiteout, and file mode bits, and
-.An Hiroki Sato Aq hrs at FreeBSD.org
+.An Hiroki Sato Aq Mt hrs at FreeBSD.org
wrote about the changes in this manual page.
.Sh BUGS
THIS FILE SYSTEM TYPE IS NOT YET FULLY SUPPORTED (READ: IT DOESN'T WORK)
@@ -357,7 +362,7 @@
.Pp
This code also needs an owner in order to be less dangerous - serious
hackers can apply by sending mail to
-.Aq freebsd-fs at FreeBSD.org
+.Aq Mt freebsd-fs at FreeBSD.org
and announcing
their intent to take it over.
.Pp
Property changes on: trunk/sbin/mount_unionfs/mount_unionfs.8
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/sbin/mount_unionfs/mount_unionfs.c
===================================================================
--- trunk/sbin/mount_unionfs/mount_unionfs.c 2018-06-19 18:30:07 UTC (rev 11106)
+++ trunk/sbin/mount_unionfs/mount_unionfs.c 2018-06-19 18:40:34 UTC (rev 11107)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 1992, 1993, 1994
* The Regents of the University of California.
@@ -44,7 +45,7 @@
static char sccsid[] = "@(#)mount_union.c 8.5 (Berkeley) 3/27/94";
#else
static const char rcsid[] =
- "$MidnightBSD$";
+ "$FreeBSD: stable/10/sbin/mount_unionfs/mount_unionfs.c 247856 2013-03-05 22:41:35Z jkim $";
#endif
#endif /* not lint */
@@ -129,7 +130,7 @@
main(int argc, char *argv[])
{
struct iovec *iov;
- int ch, mntflags, iovlen;
+ int ch, iovlen;
char source [MAXPATHLEN], target[MAXPATHLEN], errmsg[255];
char uid_str[20], gid_str[20];
char fstype[] = "unionfs";
@@ -137,7 +138,6 @@
iov = NULL;
iovlen = 0;
- mntflags = 0;
memset(errmsg, 0, sizeof(errmsg));
while ((ch = getopt(argc, argv, "bo:")) != -1) {
@@ -176,8 +176,10 @@
usage();
/* resolve both target and source with realpath(3) */
- (void)checkpath(argv[0], target);
- (void)checkpath(argv[1], source);
+ if (checkpath(argv[0], target) != 0)
+ err(EX_USAGE, "%s", target);
+ if (checkpath(argv[1], source) != 0)
+ err(EX_USAGE, "%s", source);
if (subdir(target, source) || subdir(source, target))
errx(EX_USAGE, "%s (%s) and %s (%s) are not distinct paths",
@@ -188,7 +190,7 @@
build_iovec(&iov, &iovlen, "from", target, (size_t)-1);
build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg));
- if (nmount(iov, iovlen, mntflags))
+ if (nmount(iov, iovlen, 0))
err(EX_OSERR, "%s: %s", source, errmsg);
exit(0);
}
More information about the Midnightbsd-cvs
mailing list