diff mbox

ibstat.c: fix core dump if wrong port phys state is reported

Message ID 4CA9A98B.80605@mellanox.co.il (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Yevgeny Kliteynik Oct. 4, 2010, 10:16 a.m. UTC
None
diff mbox

Patch

diff --git a/infiniband-diags/src/ibstat.c b/infiniband-diags/src/ibstat.c
index f655a13..f51d17b 100644
--- a/infiniband-diags/src/ibstat.c
+++ b/infiniband-diags/src/ibstat.c
@@ -114,7 +114,7 @@  static int port_dump(umad_port_t * port, int alone)
 	       (unsigned)port->state <=
 	       4 ? port_state_str[port->state] : "???");
 	printf("%sPhysical state: %s\n", pre,
-	       (unsigned)port->state <=
+	       (unsigned)port->phys_state <=
 	       7 ? port_phy_state_str[port->phys_state] : "???");
 	printf("%sRate: %d\n", pre, port->rate);
 	printf("%sBase lid: %d\n", pre, port->base_lid);