Use vfs_mount_error() to log mount errors in a few places with human

readable strings which can be retrieved if an "errmsg" parameter is
passed into nmount().
This commit is contained in:
Craig Rodrigues 2006-12-07 02:57:00 +00:00
parent 5b1bbad223
commit 3a13c9cc28
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=164976

View File

@ -124,8 +124,11 @@ vfs_hang_addrlist(mp, nep, argp)
}
#if MSIZE <= 256
if (argp->ex_addrlen > MLEN)
if (argp->ex_addrlen > MLEN) {
vfs_mount_error(mp, "ex_addrlen %d is greater than %d",
argp->ex_addrlen, MLEN);
return (EINVAL);
}
#endif
i = sizeof(struct netcred) + argp->ex_addrlen + argp->ex_masklen;
@ -161,6 +164,8 @@ vfs_hang_addrlist(mp, nep, argp)
}
if ((rnh = nep->ne_rtable[i]) == NULL) {
error = ENOBUFS;
vfs_mount_error(mp,
"Unable to initialize radix node head");
goto out;
}
}
@ -169,6 +174,8 @@ vfs_hang_addrlist(mp, nep, argp)
RADIX_NODE_HEAD_UNLOCK(rnh);
if (rn == NULL || np != (struct netcred *)rn) { /* already exists */
error = EPERM;
vfs_mount_error(mp, "Invalid radix node head, rn: %p %p",
rn, np);
goto out;
}
np->netc_exflags = argp->ex_flags;