summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-12-07 15:09:30 +0000
committerphk <phk@FreeBSD.org>2004-12-07 15:09:30 +0000
commit8bef9a211af27a1ed2a67904a4d563fb681fce22 (patch)
treed39e2b760037dd5d89424f91d3af594e5eae618e /sys/ufs
parentc90efa2b2fb0e64d38ea630ac7216f3509ec03a7 (diff)
downloadFreeBSD-src-8bef9a211af27a1ed2a67904a4d563fb681fce22.zip
FreeBSD-src-8bef9a211af27a1ed2a67904a4d563fb681fce22.tar.gz
Fix nfs exports (for now). The real fix is to teach mountd about
nmount.
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 7b9f4d5..02b9a2e 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -121,9 +121,8 @@ ffs_mount(struct mount *mp, struct thread *td)
int error, flags;
mode_t accessmode;
struct nameidata ndp;
- struct export_args *export;
+ struct export_args export;
char *fspec;
- int len;
if (vfs_filteropt(mp->mnt_optnew, ffs_opts))
return (EINVAL);
@@ -283,13 +282,9 @@ ffs_mount(struct mount *mp, struct thread *td)
/*
* If not updating name, process export requests.
*/
- if (fspec == NULL) {
- error = vfs_getopt(mp->mnt_optnew,
- "export", (void **)&export, &len);
- if (error || len != sizeof *export)
- return (EINVAL);
- return (vfs_export(mp, export));
- }
+ error = vfs_copyopt(mp->mnt_optnew, "export", &export, sizeof export);
+ if (error == 0 && export.ex_flags != 0)
+ return (vfs_export(mp, &export));
/*
* If this is a snapshot request, take the snapshot.
*/
OpenPOWER on IntegriCloud