[openib-general] OpenSM/osm_helper.c: Change output format of DR path from hex to decimal port numbers
Hal Rosenstock
halr at voltaire.com
Mon Jan 22 13:43:51 PST 2007
OpenSM/osm_helper.c: In osm_dump_dr_smp, osm_dump_dr_path, and
osm_dump_smp_dr_path, change output format of DR path from hex to
decimal port numbers to make compatible with OpenIB diagnostic tools
Signed-off-by: Hal Rosenstock <halr at voltaire.com>
diff --git a/osm/opensm/ChangeLog b/osm/opensm/ChangeLog
index 145d1c5..2c6564c 100644
--- a/osm/opensm/ChangeLog
+++ b/osm/opensm/ChangeLog
@@ -1,3 +1,7 @@
+2007-01-22 Hal Rosenstock <halr at voltaire.com>
+
+ * osm_helper.c: Change DR path format from [%X] to %d,
+
2007-01-08 Sasha Khapyorsky <sashak at voltaire.com>
* osm_log.c: Add osm_log_reopen_file API
diff --git a/osm/opensm/osm_helper.c b/osm/opensm/osm_helper.c
index 74713b4..50a3413 100644
--- a/osm/opensm/osm_helper.c
+++ b/osm/opensm/osm_helper.c
@@ -1966,7 +1966,10 @@ osm_dump_dr_smp(
for( i = 0; i <= p_smp->hop_count; i++ )
{
- sprintf( line, "[%X]", p_smp->initial_path[i] );
+ if (i == 0)
+ sprintf( line, "%d", p_smp->initial_path[i] );
+ else
+ sprintf( line, ",%d", p_smp->initial_path[i] );
strcat( buf, line );
}
@@ -1974,7 +1977,10 @@ osm_dump_dr_smp(
for( i = 0; i <= p_smp->hop_count; i++ )
{
- sprintf( line, "[%X]", p_smp->return_path[i] );
+ if (i == 0)
+ sprintf( line, "%d", p_smp->return_path[i] );
+ else
+ sprintf( line, ",%d", p_smp->return_path[i] );
strcat( buf, line );
}
@@ -2114,7 +2120,10 @@ osm_dump_dr_path(
for( i = 0; i <= p_path->hop_count; i++ )
{
- sprintf( line, "[%X]", p_path->path[i] );
+ if (i == 0)
+ sprintf( line, "%d", p_path->path[i] );
+ else
+ sprintf( line, ",%d", p_path->path[i] );
strcat( buf, line );
}
osm_log( p_log, log_level, "%s\n", buf );
@@ -2141,7 +2150,10 @@ osm_dump_smp_dr_path(
for( i = 0; i <= p_smp->hop_count; i++ )
{
- sprintf( line, "[%X]", p_smp->initial_path[i] );
+ if (i == 0)
+ sprintf( line, "%d", p_smp->initial_path[i] );
+ else
+ sprintf( line, ",%d", p_smp->initial_path[i] );
strcat( buf, line );
}
@@ -2149,7 +2161,10 @@ osm_dump_smp_dr_path(
for( i = 0; i <= p_smp->hop_count; i++ )
{
- sprintf( line, "[%X]", p_smp->return_path[i] );
+ if (i == 0)
+ sprintf( line, "%d", p_smp->return_path[i] );
+ else
+ sprintf( line, ",%d", p_smp->return_path[i] );
strcat( buf, line );
}
More information about the general
mailing list