[openib-general] [PATCH] ibnetdiscover: Add LMC display to switch port 0

Hal Rosenstock halr at voltaire.com
Fri Jun 9 07:23:57 PDT 2006


ibnetdiscover: Add LMC display to switch port 0

Signed-off-by: Hal Rosenstock <halr at voltaire.com>

Index: src/ibnetdiscover.c
===================================================================
--- src/ibnetdiscover.c	(revision 7841)
+++ src/ibnetdiscover.c	(working copy)
@@ -158,6 +158,7 @@ get_node(Node *node, Port *port, ib_port
 		return 0;
 
 	node->smalid = port->lid;
+	node->smalmc = port->lmc;
 
 	DEBUG("portid %s: got switch node %Lx '%s'",
 	      portid2str(portid), node->nodeguid, nd);
@@ -530,9 +531,9 @@ out_switch(Node *node, int group)
 		}
 	}
 
-	fprintf(f, "\nSwitch\t%d %s\t\t# %s port 0 lid %d\n",
+	fprintf(f, "\nSwitch\t%d %s\t\t# %s port 0 lid %d lmc %d\n",
 		node->numports, node_name(node),
-		clean_nodedesc(node->nodedesc), node->smalid);
+		clean_nodedesc(node->nodedesc), node->smalid, node->smalmc);
 }
 
 void
Index: include/ibnetdiscover.h
===================================================================
--- include/ibnetdiscover.h	(revision 7841)
+++ include/ibnetdiscover.h	(working copy)
@@ -82,6 +82,7 @@ struct Node {
 	int numports;
 	int localport;
 	int smalid;
+	int smalmc;
 	uint32_t devid;
 	uint32_t vendid;
 	uint64_t sysimgguid;







More information about the general mailing list