summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrasz <trasz@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>2020-10-29 15:28:15 +0000
committertrasz <trasz@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>2020-10-29 15:28:15 +0000
commit035dff1b4905842b8c4d8c0fc1ada6eedd0801f7 (patch)
tree76f0f04e2a8dc16cb549dc915566ddecf449d5ab
parent7cc012999bdfa34bddfb226c43bdd0c4f38970b2 (diff)
downloadfreebsd-035dff1b4905842b8c4d8c0fc1ada6eedd0801f7.tar.gz
freebsd-035dff1b4905842b8c4d8c0fc1ada6eedd0801f7.tar.bz2
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 git-svn-id: http://svn.freebsd.org/base/head@367137 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
-rw-r--r--sys/fs/nullfs/null_vfsops.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c
index a3d23d35018..0bb98072edf 100644
--- a/sys/fs/nullfs/null_vfsops.c
+++ b/sys/fs/nullfs/null_vfsops.c
@@ -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);