Sasha,
Attached is a trivial patch to modify the output format of notice type to
unsigned decimal.
-- Hal
opensm/osm_(helper trap_rcv).c: Display type in unsigned decimal rather
than hex for better clarity and to be consistent with format in osm_inform.c
Signed-off-by: Hal Rosenstock <[EMAIL PROTECTED]>
diff --git a/opensm/opensm/osm_helper.c b/opensm/opensm/osm_helper.c
index 894db02..4c67c3f 100644
--- a/opensm/opensm/osm_helper.c
+++ b/opensm/opensm/osm_helper.c
@@ -1776,7 +1776,7 @@ osm_dump_notice(IN osm_log_t * const p_log,
osm_log(p_log, log_level,
"Generic Notice dump:\n"
- "\t\t\t\ttype.....................0x%02X\n"
+ "\t\t\t\ttype.....................%u\n"
"\t\t\t\tprod_type................%u (%s)\n"
"\t\t\t\ttrap_num.................%u\n%s",
ib_notice_get_type(p_ntci),
@@ -1788,7 +1788,7 @@ osm_dump_notice(IN osm_log_t * const p_log,
} else {
osm_log(p_log, log_level,
"Vendor Notice dump:\n"
- "\t\t\t\ttype.....................0x%04x\n"
+ "\t\t\t\ttype.....................%u\n"
"\t\t\t\tvendor...................%u\n"
"\t\t\t\tdevice_id................%u\n",
cl_ntoh16(ib_notice_get_type(p_ntci)),
diff --git a/opensm/opensm/osm_trap_rcv.c b/opensm/opensm/osm_trap_rcv.c
index c189d29..0213915 100644
--- a/opensm/opensm/osm_trap_rcv.c
+++ b/opensm/opensm/osm_trap_rcv.c
@@ -327,7 +327,7 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
|| (p_ntci->g_or_v.generic.trap_num ==
CL_HTON16(131)))
OSM_LOG(sm->p_log, OSM_LOG_ERROR,
- "Received Generic Notice type:0x%02X "
+ "Received Generic Notice type:%u "
"num:%u (%s) Producer:%u (%s) "
"from LID:%u Port %d TID:0x%016"
PRIx64 "\n", ib_notice_get_type(p_ntci),
@@ -345,7 +345,7 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
);
else
OSM_LOG(sm->p_log, OSM_LOG_ERROR,
- "Received Generic Notice type:0x%02X "
+ "Received Generic Notice type:%u "
"num:%u (%s) Producer:%u (%s) "
"from LID:%u TID:0x%016" PRIx64
"\n", ib_notice_get_type(p_ntci),
@@ -362,8 +362,8 @@ __osm_trap_rcv_process_request(IN osm_sm_t * sm,
);
} else
OSM_LOG(sm->p_log, OSM_LOG_ERROR,
- "Received Vendor Notice type:0x%02X vend:0x%06X
dev:%u "
- "from LID:%u TID:0x%016" PRIx64 "\n",
+ "Received Vendor Notice type:%u vend:0x%06X "
+ "dev:%u from LID:%u TID:0x%016" PRIx64 "\n",
ib_notice_get_type(p_ntci),
cl_ntoh32(ib_notice_get_vend_id(p_ntci)),
cl_ntoh16(p_ntci->g_or_v.vend.dev_id),
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general