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);
 }
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to