svn commit: r367137 - head/sys/fs/nullfs

Edward Tomasz Napierala trasz at FreeBSD.org
Thu Oct 29 15:28:16 UTC 2020


Author: trasz
Date: Thu Oct 29 15:28:15 2020
New Revision: 367137
URL: https://svnweb.freebsd.org/changeset/base/367137

Log:
  Make it possible to mount nullfs(5) using plain mount(8)
  instead of mount_nullfs(8).
  
  Obviously you'd need to force mount(8) to not call
  mount_nullfs(8) to make use of it.
  
  Reviewed by:	kib
  MFC after:	2 weeks
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D26934

Modified:
  head/sys/fs/nullfs/null_vfsops.c

Modified: head/sys/fs/nullfs/null_vfsops.c
==============================================================================
--- head/sys/fs/nullfs/null_vfsops.c	Thu Oct 29 14:44:09 2020	(r367136)
+++ head/sys/fs/nullfs/null_vfsops.c	Thu Oct 29 15:28:15 2020	(r367137)
@@ -104,7 +104,9 @@ nullfs_mount(struct mount *mp)
 	/*
 	 * Get argument
 	 */
-	error = vfs_getopt(mp->mnt_optnew, "target", (void **)&target, &len);
+	error = vfs_getopt(mp->mnt_optnew, "from", (void **)&target, &len);
+	if (error != 0)
+		error = vfs_getopt(mp->mnt_optnew, "target", (void **)&target, &len);
 	if (error || target[len - 1] != '\0')
 		return (EINVAL);
 


More information about the svn-src-head mailing list