Logging improvements to loader::nfs

Include the server IP address when logging nfs_open(), add a few missing
"\n"s, and correct a typo.

Reviewed by:	kevans
MFC after:	2 weeks
Sponsored by:	Panasas
Differential Revision:	https://reviews.freebsd.org/D22346
This commit is contained in:
Ravi Pokala 2019-11-13 03:56:51 +00:00
parent 5ba134a464
commit 7951fbc23d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354673

View File

@ -486,7 +486,8 @@ nfs_open(const char *upath, struct open_file *f)
#ifdef NFS_DEBUG
if (debug)
printf("nfs_open: %s (rootpath=%s)\n", upath, rootpath);
printf("nfs_open: %s (rootip=%s rootpath=%s)\n", upath,
inet_ntoa(rootip), rootpath);
#endif
if (!rootpath[0]) {
printf("no rootpath, no nfs\n");
@ -691,14 +692,14 @@ nfs_read(struct open_file *f, void *buf, size_t size, size_t *resid)
if (cc == -1) {
#ifdef NFS_DEBUG
if (debug)
printf("nfs_read: read: %s", strerror(errno));
printf("nfs_read: read: %s\n", strerror(errno));
#endif
return (errno); /* XXX - from nfs_readdata */
}
if (cc == 0) {
#ifdef NFS_DEBUG
if (debug)
printf("nfs_read: hit EOF unexpectantly");
printf("nfs_read: hit EOF unexpectedly\n");
#endif
goto ret;
}