summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_mount.c4
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);
}
OpenPOWER on IntegriCloud