svn commit: r214005 - head/sys/kern
Marcel Moolenaar
marcel at FreeBSD.org
Mon Oct 18 04:34:43 UTC 2010
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);
}
More information about the svn-src-all
mailing list