[ofa-general] [PATCH 6/7][v2.0] dapl scm: add stdout logging for uname and gethostbyname errors during open.

Davis, Arlin R arlin.r.davis at intel.com
Fri Jun 20 12:00:31 PDT 2008


Signed-off by: Arlin Davis ardavis at ichips.intel.com
---
 dapl/openib_scm/dapl_ib_util.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/dapl/openib_scm/dapl_ib_util.c
b/dapl/openib_scm/dapl_ib_util.c
index 9ce9e6a..362710d 100644
--- a/dapl/openib_scm/dapl_ib_util.c
+++ b/dapl/openib_scm/dapl_ib_util.c
@@ -71,12 +71,19 @@ DAT_RETURN getipaddr( char *addr, int addr_len)
 	struct hostent		*h_ptr;
 	struct utsname		ourname;
 
-	if (uname( &ourname ) < 0) 
+	if (uname(&ourname) < 0)  {
+		 dapl_log(DAPL_DBG_TYPE_ERR, 
+			  " open_hca: uname err=%s\n", strerror(errno));
 		return DAT_INTERNAL_ERROR;
+	}
 
 	h_ptr = gethostbyname(ourname.nodename);
-	if (h_ptr == NULL) 
+	if (h_ptr == NULL) {
+		 dapl_log(DAPL_DBG_TYPE_ERR, 
+			  " open_hca: gethostbyname err=%s\n", 
+			  strerror(errno));
 		return DAT_INTERNAL_ERROR;
+	}
 
 	if (h_ptr->h_addrtype == AF_INET) {
 		int i;
-- 
1.5.2.5




More information about the general mailing list