Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Feb 2009 07:42:21 +0000 (UTC)
From:      Craig Rodrigues <rodrigc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r188217 - head/sbin/mount_nfs
Message-ID:  <200902060742.n167gLGj053426@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rodrigc
Date: Fri Feb  6 07:42:21 2009
New Revision: 188217
URL: http://svn.freebsd.org/changeset/base/188217

Log:
  Set NFSMNT_ACREGMIN, NFSMNT_ACREGMAX, and NFSMNT_ACDIRMIN flags
  in fallback_mount() function.
  Add a comment to indicate that the fallback_mount() function
  should eventually go away.
  
  Submitted by:	Jaakko Heinonen <jh saunalahti fi>

Modified:
  head/sbin/mount_nfs/mount_nfs.c

Modified: head/sbin/mount_nfs/mount_nfs.c
==============================================================================
--- head/sbin/mount_nfs/mount_nfs.c	Fri Feb  6 00:55:19 2009	(r188216)
+++ head/sbin/mount_nfs/mount_nfs.c	Fri Feb  6 07:42:21 2009	(r188217)
@@ -469,6 +469,12 @@ copyopt(struct iovec **newiov, int *newi
 		build_iovec(newiov, newiovlen, name, value, len);
 }
 
+/*
+ * XXX: This function is provided for backwards
+ *      compatibility with older kernels which did not support
+ *      passing NFS mount options to nmount() as individual
+ *      parameters.  It should be eventually be removed.
+ */
 int
 fallback_mount(struct iovec *iov, int iovlen, int mntflags)
 {
@@ -587,18 +593,21 @@ fallback_mount(struct iovec *iov, int io
 		if (ret != 1 || args.acregmin < 0) {
 			errx(1, "illegal acregmin: %s", opt);
 		}
+		args.flags |= NFSMNT_ACREGMIN;
 	}
 	if (findopt(iov, iovlen, "acregmax", &opt, NULL) == 0) {
 		ret = sscanf(opt, "%d", &args.acregmax);
 		if (ret != 1 || args.acregmax < 0) {
 			errx(1, "illegal acregmax: %s", opt);
 		}
+		args.flags |= NFSMNT_ACREGMAX;
 	}
 	if (findopt(iov, iovlen, "acdirmin", &opt, NULL) == 0) {
 		ret = sscanf(opt, "%d", &args.acdirmin);
 		if (ret != 1 || args.acdirmin < 0) {
 			errx(1, "illegal acdirmin: %s", opt);
 		}
+		args.flags |= NFSMNT_ACDIRMIN;
 	}
 	if (findopt(iov, iovlen, "acdirmax", &opt, NULL) == 0) {
 		ret = sscanf(opt, "%d", &args.acdirmax);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902060742.n167gLGj053426>