diff options
author | marcel <marcel@FreeBSD.org> | 2010-10-18 04:34:42 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2010-10-18 04:34:42 +0000 |
commit | f093b8cccc37f29553473c19d6bec2c64032b72c (patch) | |
tree | 163690e01d74e9c2638d7513526644680af7d02a /sys/kern | |
parent | ff2b095a39c973b37aa4dbe739cd40e11d7483e4 (diff) | |
download | FreeBSD-src-f093b8cccc37f29553473c19d6bec2c64032b72c.zip FreeBSD-src-f093b8cccc37f29553473c19d6bec2c64032b72c.tar.gz |
In vfs_filteropt(), only print the errmsg when there's no errmsg
mount option. Otherwise errors tend to get printed multiple times.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_mount.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 5b0fd00..83cbc60 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1424,15 +1424,17 @@ vfs_filteropt(struct vfsoptlist *opts, const char **legal) 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); } |