From owner-svn-src-all@FreeBSD.ORG Mon Oct 18 04:34:42 2010 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 EED1A1065674; Mon, 18 Oct 2010 04:34:42 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD6078FC08; Mon, 18 Oct 2010 04:34:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9I4YgZL073844; Mon, 18 Oct 2010 04:34:42 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9I4Yg04073842; Mon, 18 Oct 2010 04:34:42 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201010180434.o9I4Yg04073842@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 18 Oct 2010 04:34:42 +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: r214005 - head/sys/kern 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: Mon, 18 Oct 2010 04:34:43 -0000 Author: marcel Date: Mon Oct 18 04:34:42 2010 New Revision: 214005 URL: http://svn.freebsd.org/changeset/base/214005 Log: In vfs_filteropt(), only print the errmsg when there's no errmsg mount option. Otherwise errors tend to get printed multiple times. Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Mon Oct 18 04:30:27 2010 (r214004) +++ head/sys/kern/vfs_mount.c Mon Oct 18 04:34:42 2010 (r214005) @@ -1424,15 +1424,17 @@ vfs_filteropt(struct vfsoptlist *opts, c continue; snprintf(errmsg, sizeof(errmsg), "mount option <%s> is unknown", p); - printf("%s\n", errmsg); ret = EINVAL; } if (ret != 0) { TAILQ_FOREACH(opt, opts, link) { if (strcmp(opt->name, "errmsg") == 0) { strncpy((char *)opt->value, errmsg, opt->len); + break; } } + if (opt == NULL) + printf("%s\n", errmsg); } return (ret); }