diff options
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/cd9660/cd9660_vfsops.c | 14 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 15 | ||||
-rw-r--r-- | sys/fs/ntfs/ntfs_vfsops.c | 19 |
3 files changed, 15 insertions, 33 deletions
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index b68e59e..30aba51 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -128,9 +128,8 @@ static int cd9660_mount(struct mount *mp, struct thread *td) { struct vnode *devvp; - struct export_args *export; char *fspec; - int error, len; + int error; mode_t accessmode; struct nameidata ndp; struct iso_mnt *imp = 0; @@ -145,15 +144,10 @@ cd9660_mount(struct mount *mp, struct thread *td) return (error); imp = VFSTOISOFS(mp); - /* - * If updating, check whether changing from read-only to - * read/write; if there is no device name, that's all we do. - */ + if (mp->mnt_flag & MNT_UPDATE) { - error = vfs_getopt(mp->mnt_optnew, - "export", (void **)&export, &len); - if (error == 0 && len == sizeof *export && export->ex_flags) - return (vfs_export(mp, export)); + if (vfs_flagopt(mp->mnt_optnew, "export", NULL, 0)) + return (0); } /* * Not an update, or updating the name: look up the name diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 93a58fc..a07b567 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -243,7 +243,6 @@ static int msdosfs_mount(struct mount *mp, struct thread *td) { struct vnode *devvp; /* vnode for blk device to mount */ - struct export_args export; /* msdosfs specific mount control block */ struct msdosfsmount *pmp = NULL; struct nameidata ndp; @@ -261,16 +260,12 @@ msdosfs_mount(struct mount *mp, struct thread *td) if (mp->mnt_flag & MNT_UPDATE) { pmp = VFSTOMSDOSFS(mp); - error = vfs_copyopt(mp->mnt_optnew, "export", - &export, sizeof export); - if (error == 0 && export.ex_flags != 0) { - /* - * Process export requests. - */ - if ((export.ex_flags & MNT_EXPORTED) != 0 && - (pmp->pm_flags & MSDOSFS_LARGEFS) != 0) + if (vfs_flagopt(mp->mnt_optnew, "export", NULL, 0)) { + /* Process export requests. */ + if ((pmp->pm_flags & MSDOSFS_LARGEFS) != 0) return (EOPNOTSUPP); - return (vfs_export(mp, &export)); + else + return (0); } if (!(pmp->pm_flags & MSDOSFSMNT_RONLY) && vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0)) { diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c index b670318..31f1a0b 100644 --- a/sys/fs/ntfs/ntfs_vfsops.c +++ b/sys/fs/ntfs/ntfs_vfsops.c @@ -157,7 +157,6 @@ ntfs_mount ( struct vnode *devvp; struct nameidata ndp; char *from; - struct export_args export; if (vfs_filteropt(mp->mnt_optnew, ntfs_opts)) return (EINVAL); @@ -171,20 +170,14 @@ ntfs_mount ( * read/write. */ if (mp->mnt_flag & MNT_UPDATE) { - error = vfs_copyopt(mp->mnt_optnew, "export", - &export, sizeof export); - if ((error == 0) && export.ex_flags != 0) { - /* - * Process export requests. Jumping to "success" - * will return the vfs_export() error code. - */ - err = vfs_export(mp, &export); + if (vfs_flagopt(mp->mnt_optnew, "export", NULL, 0)) { + /* Process export requests in vfs_mount.c */ goto success; + } else { + printf("ntfs_mount(): MNT_UPDATE not supported\n"); + err = EINVAL; + goto error_1; } - - printf("ntfs_mount(): MNT_UPDATE not supported\n"); - err = EINVAL; - goto error_1; } /* |