[openib-general] [PATCH TRIVIAL] opensm: libibumad: show open()'s errno string.

Sasha Khapyorsky sashak at voltaire.com
Tue Sep 26 13:51:30 PDT 2006


Show errno string then open() fails.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---

 libibumad/src/umad.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libibumad/src/umad.c b/libibumad/src/umad.c
index cb9eef6..7bf0048 100644
--- a/libibumad/src/umad.c
+++ b/libibumad/src/umad.c
@@ -575,7 +575,7 @@ umad_open_port(char *ca_name, int portnu
 		 UMAD_DEV_DIR , umad_id);
 
 	if ((port->dev_fd = open(port->dev_file, O_RDWR|O_NONBLOCK)) < 0) {
-		DEBUG("open %s failed", port->dev_file);
+		DEBUG("open %s failed: %s", port->dev_file, strerror(errno));
 		return -EIO;
 	}
 




More information about the general mailing list