]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
dapl scm: add stdout logging for uname and gethostbyname errors during open.
authorArlin Davis <arlin.r.davis@intel.com>
Wed, 18 Jun 2008 21:21:28 +0000 (14:21 -0700)
committerArlin Davis <arlin.r.davis@intel.com>
Wed, 18 Jun 2008 21:21:28 +0000 (14:21 -0700)
Signed-off by: Arlin Davis ardavis@ichips.intel.com

dapl/openib_scm/dapl_ib_util.c

index 9ce9e6a9a6f772591d7e610ff11b406707319de1..362710d47514a75a409cdf8d51036e8ecb020bcc 100644 (file)
@@ -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;