From owner-svn-src-all@FreeBSD.ORG Fri Feb 6 07:42:22 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 636841065670; Fri, 6 Feb 2009 07:42:22 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5258D8FC16; Fri, 6 Feb 2009 07:42:22 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n167gLlT053427; Fri, 6 Feb 2009 07:42:22 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n167gLGj053426; Fri, 6 Feb 2009 07:42:21 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <200902060742.n167gLGj053426@svn.freebsd.org> From: Craig Rodrigues Date: Fri, 6 Feb 2009 07:42:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188217 - head/sbin/mount_nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2009 07:42:22 -0000 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 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);