summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_export.c
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2006-12-07 02:57:00 +0000
committerrodrigc <rodrigc@FreeBSD.org>2006-12-07 02:57:00 +0000
commitfbf224913d300a2697d1ab841d44e70e6c3813ad (patch)
tree516901e73e159bd0cf6e1c69250af7a0b22f8612 /sys/kern/vfs_export.c
parent2e7d84aa9de58f67e00a9db6d510a60b44b8c1f7 (diff)
downloadFreeBSD-src-fbf224913d300a2697d1ab841d44e70e6c3813ad.zip
FreeBSD-src-fbf224913d300a2697d1ab841d44e70e6c3813ad.tar.gz
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().
Diffstat (limited to 'sys/kern/vfs_export.c')
-rw-r--r--sys/kern/vfs_export.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index 00237b6..ea3db60 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -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;
OpenPOWER on IntegriCloud