Date: Mon, 18 Oct 2010 04:34:42 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r214005 - head/sys/kern Message-ID: <201010180434.o9I4Yg04073842@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010180434.o9I4Yg04073842>