Skip to contentSkip to conversation

opensm/osmtest/osmtest.c: Fix endian in some log messages

PATCH In review Hal Rosenstock 2 participants 2 messages Jun 4, 2011 – Jun 6, 2011 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 opensm/osmtest/osmtest.c: Fix endian in some log messages

---

osmtest/osmtest.c +8 -5
index 7ecc8ce..baf7440 100644
@@ -865,7 +865,7 @@ osmtest_get_path_rec_by_guid_pair(IN osmtest_t * const p_osmt,
 
 	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 		"Query for path from 0x%" PRIx64 " to 0x%" PRIx64 "\n",
-		sguid, dguid);
+		cl_ntoh64(sguid), cl_ntoh64(dguid));
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
@@ -928,9 +928,11 @@ osmtest_get_path_rec_by_gid_pair(IN osmtest_t * const p_osmt,
 
 	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
 		"Query for path from 0x%016" PRIx64 " 0x%016" PRIx64
-		" to 0x%016" PRIx64 " 0x%016" PRIx64 "\n", sgid.unicast.prefix,
-		sgid.unicast.interface_id, dgid.unicast.prefix,
-		dgid.unicast.interface_id);
+		" to 0x%016" PRIx64 " 0x%016" PRIx64 "\n", 
+		cl_ntoh64(sgid.unicast.prefix),
+		cl_ntoh64(sgid.unicast.interface_id),
+		cl_ntoh64(dgid.unicast.prefix),
+		cl_ntoh64(dgid.unicast.interface_id));
 
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
@@ -1985,7 +1987,8 @@ osmtest_get_path_rec_by_lid_pair(IN osmtest_t * const p_osmt,
 	req.sm_key = 0;
 
 	OSM_LOG(&p_osmt->log, OSM_LOG_VERBOSE,
-		"Query for path from 0x%X to 0x%X\n", slid, dlid);
+		"Query for path from 0x%X to 0x%X\n",
+		cl_ntoh16(slid), cl_ntoh16(dlid));
 	status = osmv_query_sa(p_osmt->h_bind, &req);
 	if (status != IB_SUCCESS) {
 		OSM_LOG(&p_osmt->log, OSM_LOG_ERROR, "ERR 0053: "

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

A message that is not in the archive (sent off-list or not yet received): 4DEA49FB.1040905-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org