[Midnightbsd-cvs] src [11109] trunk/sbin/mount_nullfs/mount_nullfs.c: sync nullfs mount with freebsd

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Tue Jun 19 14:41:56 EDT 2018


Revision: 11109
          http://svnweb.midnightbsd.org/src/?rev=11109
Author:   laffer1
Date:     2018-06-19 14:41:55 -0400 (Tue, 19 Jun 2018)
Log Message:
-----------
sync nullfs mount with freebsd

Modified Paths:
--------------
    trunk/sbin/mount_nullfs/Makefile
    trunk/sbin/mount_nullfs/mount_nullfs.8
    trunk/sbin/mount_nullfs/mount_nullfs.c

Property Changed:
----------------
    trunk/sbin/mount_nullfs/mount_nullfs.8

Modified: trunk/sbin/mount_nullfs/Makefile
===================================================================
--- trunk/sbin/mount_nullfs/Makefile	2018-06-19 18:41:25 UTC (rev 11108)
+++ trunk/sbin/mount_nullfs/Makefile	2018-06-19 18:41:55 UTC (rev 11109)
@@ -1,5 +1,6 @@
+# $MidnightBSD$
 #	@(#)Makefile	8.3 (Berkeley) 3/27/94
-# $MidnightBSD$
+# $FreeBSD: stable/10/sbin/mount_nullfs/Makefile 198236 2009-10-19 16:00:24Z ru $
 
 PROG=	mount_nullfs
 SRCS=	mount_nullfs.c getmntopts.c

Modified: trunk/sbin/mount_nullfs/mount_nullfs.8
===================================================================
--- trunk/sbin/mount_nullfs/mount_nullfs.8	2018-06-19 18:41:25 UTC (rev 11108)
+++ trunk/sbin/mount_nullfs/mount_nullfs.8	2018-06-19 18:41:55 UTC (rev 11109)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
 .\"
 .\" Copyright (c) 1992, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -31,9 +32,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)mount_null.8	8.6 (Berkeley) 5/1/95
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/sbin/mount_nullfs/mount_nullfs.8 307406 2016-10-16 22:27:16Z sevan $
 .\"
-.Dd May 1, 1995
+.Dd October 3, 2016
 .Dt MOUNT_NULLFS 8
 .Os
 .Sh NAME
@@ -240,6 +241,10 @@
 .Em "Stackable Layers: an Architecture for File System Development" .
 .Sh HISTORY
 The
-.Nm
+.Nm mount_null
 utility first appeared in
 .Bx 4.4 .
+It was renamed to
+.Nm
+in
+.Fx 5.0 .


Property changes on: trunk/sbin/mount_nullfs/mount_nullfs.8
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/sbin/mount_nullfs/mount_nullfs.c
===================================================================
--- trunk/sbin/mount_nullfs/mount_nullfs.c	2018-06-19 18:41:25 UTC (rev 11108)
+++ trunk/sbin/mount_nullfs/mount_nullfs.c	2018-06-19 18:41:55 UTC (rev 11109)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * Copyright (c) 1992, 1993, 1994
  *	The Regents of the University of California.  All rights reserved.
@@ -41,7 +42,7 @@
 static char sccsid[] = "@(#)mount_null.c	8.6 (Berkeley) 4/26/95";
 #endif
 static const char rcsid[] =
-  "$MidnightBSD$";
+  "$FreeBSD: stable/10/sbin/mount_nullfs/mount_nullfs.c 267808 2014-06-23 22:35:41Z rodrigc $";
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -68,12 +69,11 @@
 	char source[MAXPATHLEN];
 	char target[MAXPATHLEN];
 	char errmsg[255];
-	int ch, mntflags, iovlen;
+	int ch, iovlen;
 	char nullfs[] = "nullfs";
 
 	iov = NULL;
 	iovlen = 0;
-	mntflags = 0;
 	errmsg[0] = '\0';
 	while ((ch = getopt(argc, argv, "o:")) != -1)
 		switch(ch) {
@@ -98,8 +98,10 @@
 		usage();
 
 	/* resolve 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 are not distinct paths",
@@ -109,7 +111,7 @@
 	build_iovec(&iov, &iovlen, "fspath", source, (size_t)-1);
 	build_iovec(&iov, &iovlen, "target", target, (size_t)-1);
 	build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg));
-	if (nmount(iov, iovlen, mntflags) < 0) {
+	if (nmount(iov, iovlen, 0) < 0) {
 		if (errmsg[0] != 0)
 			err(1, "%s: %s", source, errmsg);
 		else



More information about the Midnightbsd-cvs mailing list