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:
rodrigc 2006-12-07 02:57:00 +00:00
parent 2e7d84aa9d
commit fbf224913d

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;