summaryrefslogtreecommitdiffstats
path: root/contrib/amd
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1998-09-14 08:20:37 +0000
committerobrien <obrien@FreeBSD.org>1998-09-14 08:20:37 +0000
commitdd529a7ea9097f1384219ac629af33aa8e48a25e (patch)
treedd5dc98dcc3f09dcbc98d1d22d8b130edfdbc425 /contrib/amd
parent70bb8503aada512ec1237d4fe781e53761791b6a (diff)
downloadFreeBSD-src-dd529a7ea9097f1384219ac629af33aa8e48a25e.zip
FreeBSD-src-dd529a7ea9097f1384219ac629af33aa8e48a25e.tar.gz
Support our "nfsv2" option. (originally added to old amd/amd/host_opts.c
rev 1.5) The "nfsv2" option is equivant to "proto=udp,vers=2". It is debatable whether NFS v2 should force "proto=udp" but I figure that is what most people will expect. Note, I can get the new Amd to mount a 2.2-STABLE box with "proto=tcp,vers=2". RFC 1094 does not disallow such behavior.
Diffstat (limited to 'contrib/amd')
-rw-r--r--contrib/amd/amd/srvr_nfs.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/contrib/amd/amd/srvr_nfs.c b/contrib/amd/amd/srvr_nfs.c
index 22a2640..88e174d 100644
--- a/contrib/amd/amd/srvr_nfs.c
+++ b/contrib/amd/amd/srvr_nfs.c
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: srvr_nfs.c,v 5.2.2.1 1992/02/09 15:09:06 jsp beta $
+ * $Id: srvr_nfs.c,v 1.1.1.1 1998/08/23 22:07:20 obrien Exp $
*
*/
@@ -663,6 +663,19 @@ find_nfs_srvr(mntfs *mf)
}
#endif /* MNTTAB_OPT_PROTO */
+/* XXX: do we want to do this unconditionally of #define's? */
+/* #if defined(MNTTAB_OPT_VERS ) && defined( MNTTAB_OPT_PROTO ) */
+ {
+ char *nfsv2_opt = hasmntopt(&mnt, "nfsv2");
+ if (nfsv2_opt) {
+ nfs_version = (unsigned long)2; /* nullify any ``vers=X'' statements */
+ nfs_proto = "udp"; /* nullify any ``proto=tcp'' stmts */
+ plog(XLOG_WARNING, "found compatiblity option \"nfsv2\": set options"
+ " vers=2, proto=udp for host %s", host);
+ }
+ }
+/*#endif*/ /* MNTTAB_OPT_VERS && MNTTAB_OPT_PROTO */
+
/*
* lookup host address and canonical name
*/
OpenPOWER on IntegriCloud