[PATCH rdma-core 1/3] ibacm: acm_util.c: Better log message when ioctl fails in acm_if_iter_sys

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



RETURN VALUE for ioctl says:
On error, -1 is returned, and errno is set appropriately.

Rather than log the return value, use the string for errno.

Signed-off-by: Hal Rosenstock <hal@xxxxxxxxxxxx>
---
 ibacm/src/acm_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ibacm/src/acm_util.c b/ibacm/src/acm_util.c
index aca042d..b50fd74 100644
--- a/ibacm/src/acm_util.c
+++ b/ibacm/src/acm_util.c
@@ -152,7 +152,7 @@ int acm_if_iter_sys(acm_if_iter_cb cb, void *ctx)
 
 	ret = ioctl(s, SIOCGIFCONF, ifc);
 	if (ret < 0) {
-		acm_log(0, "ioctl ifconf error %d\n", ret);
+		acm_log(0, "ioctl ifconf error: %s\n", strerror(errno));
 		goto out2;
 	}
 
-- 
2.8.4

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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux