[openib-general] [PATCH TRIVIAL] opensm: net to host conversion for printing

Sasha Khapyorsky sashak at voltaire.com
Sat Oct 28 12:57:27 PDT 2006


This converts guid value to host byte order before printing.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 osm/opensm/osm_mtree.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/osm/opensm/osm_mtree.c b/osm/opensm/osm_mtree.c
index 65e9911..bd23192 100644
--- a/osm/opensm/osm_mtree.c
+++ b/osm/opensm/osm_mtree.c
@@ -123,8 +123,8 @@ __osm_mtree_dump(
   if (p_mtn == NULL)
     return;
 
-  printf("GUID:0x%016" PRIx64 " max_children:%d\n", 
-         p_mtn->p_sw->p_node->node_info.node_guid,
+  printf("GUID:0x%016" PRIx64 " max_children:%u\n",
+         cl_ntoh64(p_mtn->p_sw->p_node->node_info.node_guid),
          p_mtn->max_children );
   if ( p_mtn->child_array != NULL ) 
   {
@@ -135,5 +135,4 @@ __osm_mtree_dump(
         __osm_mtree_dump(p_mtn->child_array[i]);
     }
   }
-  
 }
-- 
1.4.3.2.g4bf7





More information about the general mailing list