svn commit: r188217 - head/sbin/mount_nfs

Craig Rodrigues rodrigc at FreeBSD.org
Thu Feb 5 23:42:22 PST 2009


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);


More information about the svn-src-all mailing list