mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-01 17:00:36 +00:00
In vfs_filteropt(), only print the errmsg when there's no errmsg
mount option. Otherwise errors tend to get printed multiple times.
This commit is contained in:
parent
76e18b25a0
commit
c1f0aabb9f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=214005
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user