summaryrefslogtreecommitdiffstats
path: root/sys/ntfs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2001-04-25 07:07:52 +0000
committerphk <phk@FreeBSD.org>2001-04-25 07:07:52 +0000
commitcdc83afc7f1e444c4646840f48592b7ff524fbea (patch)
tree1d205c2b7e9b1a72323178bdb64ac082cbe816a5 /sys/ntfs
parent3a77c500a93ed027c8d6959da8f6ecc3c7752441 (diff)
downloadFreeBSD-src-cdc83afc7f1e444c4646840f48592b7ff524fbea.zip
FreeBSD-src-cdc83afc7f1e444c4646840f48592b7ff524fbea.tar.gz
Move the netexport structure from the fs-specific mountstructure
to struct mount. This makes the "struct netexport *" paramter to the vfs_export and vfs_checkexport interface unneeded. Consequently that all non-stacking filesystems can use vfs_stdcheckexp(). At the same time, make it a pointer to a struct netexport in struct mount, so that we can remove the bogus AF_MAX and #include <net/radix.h> from <sys/mount.h>
Diffstat (limited to 'sys/ntfs')
-rw-r--r--sys/ntfs/ntfs.h2
-rw-r--r--sys/ntfs/ntfs_vfsops.c18
2 files changed, 9 insertions, 11 deletions
diff --git a/sys/ntfs/ntfs.h b/sys/ntfs/ntfs.h
index 9bf7751..d74fe6f 100644
--- a/sys/ntfs/ntfs.h
+++ b/sys/ntfs/ntfs.h
@@ -255,7 +255,9 @@ struct ntfsmount {
cn_t ntm_cfree;
struct ntvattrdef *ntm_ad;
int ntm_adnum;
+#if !defined(__FreeBSD__)
struct netexport ntm_export; /* export information */
+#endif
};
#define ntm_mftcn ntm_bootfile.bf_mftcn
diff --git a/sys/ntfs/ntfs_vfsops.c b/sys/ntfs/ntfs_vfsops.c
index 89a7dd7..b6fde8e 100644
--- a/sys/ntfs/ntfs_vfsops.c
+++ b/sys/ntfs/ntfs_vfsops.c
@@ -99,8 +99,6 @@ struct sockaddr;
static int ntfs_mount __P((struct mount *, char *, caddr_t,
struct nameidata *, struct proc *));
static int ntfs_init __P((struct vfsconf *));
-static int ntfs_checkexp __P((struct mount *, struct sockaddr *,
- int *, struct ucred **));
#elif defined(__NetBSD__)
static int ntfs_mount __P((struct mount *, const char *, void *,
struct nameidata *, struct proc *));
@@ -116,19 +114,13 @@ static int ntfs_checkexp __P((struct mount *, struct mbuf *,
* Verify a remote client has export rights and return these rights via.
* exflagsp and credanonp.
*/
+#if !defined(__FreeBSD__)
static int
ntfs_checkexp(mp, nam, exflagsp, credanonp)
-#if defined(__FreeBSD__)
- register struct mount *mp;
- struct sockaddr *nam;
- int *exflagsp;
- struct ucred **credanonp;
-#else /* defined(__NetBSD__) */
register struct mount *mp;
struct mbuf *nam;
int *exflagsp;
struct ucred **credanonp;
-#endif
{
register struct netcred *np;
register struct ntfsmount *ntm = VFSTONTFS(mp);
@@ -139,11 +131,11 @@ ntfs_checkexp(mp, nam, exflagsp, credanonp)
np = vfs_export_lookup(mp, &ntm->ntm_export, nam);
if (np == NULL)
return (EACCES);
-
*exflagsp = np->netc_exflags;
*credanonp = &np->netc_anon;
return (0);
}
+#endif
#if defined(__NetBSD__)
/*ARGSUSED*/
@@ -306,8 +298,12 @@ ntfs_mount (
* Process export requests. Jumping to "success"
* will return the vfs_export() error code.
*/
+#if defined(__FreeBSD__)
+ err = vfs_export(mp, &args.export);
+#else /* defined(__NetBSD__) */
struct ntfsmount *ntm = VFSTONTFS(mp);
err = vfs_export(mp, &ntm->ntm_export, &args.export);
+#endif
goto success;
}
@@ -1007,7 +1003,7 @@ static struct vfsops ntfs_vfsops = {
vfs_stdsync,
ntfs_vget,
ntfs_fhtovp,
- ntfs_checkexp,
+ vfs_stdcheckexp,
ntfs_vptofh,
ntfs_init,
ntfs_uninit,
OpenPOWER on IntegriCloud