From 37518a88fb166d8a2d02c44764faec2c88edfd6a Mon Sep 17 00:00:00 2001 From: Craig Rodrigues Date: Fri, 26 Jan 2007 13:26:43 +0000 Subject: [PATCH] If nmount() fails to export a directory, in the syslog() error message, add the errmsg string returned by nmount(). --- usr.sbin/mountd/mountd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index d11d53861ea..4097dddcd7c 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -1962,7 +1962,8 @@ do_mount(struct exportlist *ep, struct grouplist *grp, int exflags, if (cp == dirp) { if (debug) warnx("mnt unsucc"); - syslog(LOG_ERR, "can't export %s", dirp); + syslog(LOG_ERR, "can't export %s %s", dirp, + errmsg); ret = 1; goto error_exit; } @@ -1972,7 +1973,8 @@ do_mount(struct exportlist *ep, struct grouplist *grp, int exflags, if (statfs(dirp, &fsb1) != 0 || bcmp(&fsb1.f_fsid, &fsb->f_fsid, sizeof(fsb1.f_fsid)) != 0) { *cp = savedc; - syslog(LOG_ERR, "can't export %s", dirp); + syslog(LOG_ERR, "can't export %s %s", dirp, + errmsg); ret = 1; goto error_exit; }