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
This commit is contained in:
Conrad Meyer 2015-07-22 22:53:40 +00:00
parent ddaf675fc8
commit 773e56519d

View File

@ -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);
}