aboutsummaryrefslogtreecommitdiff
path: root/sbin/mount_nfs/mount_nfs.c
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2015-07-22 22:53:40 +0000
committerConrad Meyer <cem@FreeBSD.org>2015-07-22 22:53:40 +0000
commit773e56519d82be8cfc10d1a917b43aaddb542e31 (patch)
treec84e79b928d6077173ca09e7a7c5d0f7bc63b07c /sbin/mount_nfs/mount_nfs.c
parentddaf675fc827f6f8701adb96e70c591feddc5471 (diff)
downloadsrc-773e56519d82be8cfc10d1a917b43aaddb542e31.tar.gz
src-773e56519d82be8cfc10d1a917b43aaddb542e31.zip
mount_nfs: Be more clear on nmount(2) error with errmsg unset
Differential Revision: https://reviews.freebsd.org/D3147 Reviewed by: rmacklem Approved by: markj (mentor) MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=285804
Diffstat (limited to 'sbin/mount_nfs/mount_nfs.c')
-rw-r--r--sbin/mount_nfs/mount_nfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c
index 836bc87daa48..810cf59da0c4 100644
--- a/sbin/mount_nfs/mount_nfs.c
+++ b/sbin/mount_nfs/mount_nfs.c
@@ -476,7 +476,8 @@ main(int argc, char *argv[])
build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg));
if (nmount(iov, iovlen, 0))
- err(1, "%s, %s", mntpath, errmsg);
+ err(1, "nmount: %s%s%s", mntpath, errmsg[0] ? ", " : "",
+ errmsg);
exit(0);
}