summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2009-02-06 07:42:21 +0000
committerrodrigc <rodrigc@FreeBSD.org>2009-02-06 07:42:21 +0000
commitbee75cb3e3f31047d4a5bcd8eb24d48c1945b611 (patch)
treed3bfc9b9368fde5407827a489ecf71f79e4107fe /sbin
parent3d93b85eb4c29a48401123dde8b5d4b4902cec7d (diff)
downloadFreeBSD-src-bee75cb3e3f31047d4a5bcd8eb24d48c1945b611.zip
FreeBSD-src-bee75cb3e3f31047d4a5bcd8eb24d48c1945b611.tar.gz
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>
Diffstat (limited to 'sbin')
-rw-r--r--sbin/mount_nfs/mount_nfs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c
index 4721943..4f43cfc 100644
--- a/sbin/mount_nfs/mount_nfs.c
+++ b/sbin/mount_nfs/mount_nfs.c
@@ -469,6 +469,12 @@ copyopt(struct iovec **newiov, int *newiovlen,
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 iovlen, int mntflags)
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);
OpenPOWER on IntegriCloud