All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Chiu <boris.chiu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Ira Weiny <iweiny-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH] libibmad: Conversion specifier; "%m" is not supported on Solaris
Date: Tue, 12 Mar 2013 12:47:46 -0700	[thread overview]
Message-ID: <513F8662.6000809@oracle.com> (raw)

From: Brendan Doyle <brendan.doyle-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

Signed-off-by: Brendan Doyle <brendan.doyle-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
src/rpc.c  |    4 ++--
src/serv.c |    7 ++++---
2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/rpc.c b/src/rpc.c
index 6312d42..4fb5a21 100644
--- a/src/rpc.c
+++ b/src/rpc.c
@@ -153,7 +153,7 @@ _do_madrpc(int port_id, void *sndbuf, void *rcvbuf, int agentid, int len,

		length = len;
		if (umad_send(port_id, agentid, sndbuf, length, timeout, 0) < 0) {
-			IBWARN("send failed; %m");
+			IBWARN("send failed; %s", strerror(errno));
			return -1;
		}

@@ -162,7 +162,7 @@ _do_madrpc(int port_id, void *sndbuf, void *rcvbuf, int agentid, int len,
		do {
			length = len;
			if (umad_recv(port_id, rcvbuf, &length, timeout) < 0) {
-				IBWARN("recv failed: %m");
+				IBWARN("recv failed: %s", strerror(errno));
				return -1;
			}

diff --git a/src/serv.c b/src/serv.c
index 2e3b7ef..ae5fd6c 100644
--- a/src/serv.c
+++ b/src/serv.c
@@ -38,6 +38,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <errno.h>

#include <infiniband/umad.h>
#include <infiniband/mad.h>
@@ -75,7 +76,7 @@ int mad_send_via(ib_rpc_t * rpc, ib_portid_t * dport, ib_rmpp_hdr_t * rmpp,
	if (umad_send(srcport->port_id, srcport->class_agents[rpc->mgtclass & 0xff],
		      umad, IB_MAD_SIZE, mad_get_timeout(srcport, rpc->timeout),
		      0) < 0) {
-		IBWARN("send failed; %m");
+		IBWARN("send failed; %s", strerror(errno));
		return -1;
	}

@@ -157,7 +158,7 @@ int mad_respond_via(void *umad, ib_portid_t * portid, uint32_t rstatus,
	if (umad_send
	    (srcport->port_id, srcport->class_agents[rpc.mgtclass], umad,
	     IB_MAD_SIZE, mad_get_timeout(srcport, rpc.timeout), 0) < 0) {
-		DEBUG("send failed; %m");
+		DEBUG("send failed; %s", strerror(errno));
		return -1;
	}

@@ -179,7 +180,7 @@ void *mad_receive_via(void *umad, int timeout, struct ibmad_port *srcport)
			       mad_get_timeout(srcport, timeout))) < 0) {
		if (!umad)
			umad_free(mad);
-		DEBUG("recv failed: %m");
+		DEBUG("recv failed: %s", strerror(errno));
		return 0;
	}

-- 
1.7.1




--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2013-03-12 19:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-12 19:47 Boris Chiu [this message]
     [not found] <1363102410-38435-1-git-send-email-boris.chiu@oracle.com>
     [not found] ` <1363102410-38435-1-git-send-email-boris.chiu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2013-03-14 13:26   ` [PATCH] libibmad: Conversion specifier; %m is not supported on Solaris Ira Weiny
  -- strict thread matches above, loose matches on Subject: below --
2013-03-12 19:38 Boris Chiu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=513F8662.6000809@oracle.com \
    --to=boris.chiu-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=iweiny-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.