[ofa-general] [infiniband-diags] [PATCH] [3/5] libibnetdisc cleanup patches

Al Chu chu11 at llnl.gov
Tue Jul 7 15:24:52 PDT 2009


Properly prefix all libibnetdisc structs with ibnd_, to associate them
with the libibnetdisc library and avoid potential name conflicts with
other code.

Al

-- 
Albert Chu
chu11 at llnl.gov
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory
-------------- next part --------------
>From f1c04e6d38c9408b475274bbae6ef16be9e2d498 Mon Sep 17 00:00:00 2001
From: Albert Chu <chu11 at llnl.gov>
Date: Tue, 7 Jul 2009 11:25:29 -0700
Subject: [PATCH] Properly prefix all libibnetdisc structs with ibnd_, to associate them with the libibnetdisc library and avoid potential name conflicts with other code.

Signed-off-by: Albert Chu <chu11 at llnl.gov>
Signed-off-by: Ira Weiny <weiny2 at llnl.gov>
---
 .../libibnetdisc/include/infiniband/ibnetdisc.h    |   26 ++++++++++----------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h b/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h
index 5f07805..62d639f 100644
--- a/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h
+++ b/infiniband-diags/libibnetdisc/include/infiniband/ibnetdisc.h
@@ -38,15 +38,15 @@
 #include <infiniband/mad.h>
 #include <iba/ib_types.h>
 
-struct ib_fabric; /* forward declare */
-struct chassis; /* forward declare */
-struct port; /* forward declare */
+struct ibnd_fabric; /* forward declare */
+struct ibnd_chassis; /* forward declare */
+struct ibnd_port; /* forward declare */
 
 /** =========================================================================
  * Node
  */
-typedef struct node {
-	struct node *next; /* all node list in fabric */
+typedef struct ibnd_node {
+	struct ibnd_node *next; /* all node list in fabric */
 
 	ib_portid_t path_portid; /* path from "from_node" */
 	int dist; /* num of hops from "from_node" */
@@ -67,13 +67,13 @@ typedef struct node {
 
 	char nodedesc[IB_SMP_DATA_SIZE];
 
-	struct port **ports; /* in order array of port pointers */
+	struct ibnd_port **ports; /* in order array of port pointers */
 				/* the size of this array is info.numports + 1 */
 				/* items MAY BE NULL!  (ie 0 == switches only) */
 
 	/* chassis info */
-	struct node *next_chassis_node; /* next node in ibnd_chassis_t->nodes */
-	struct chassis *chassis; /* if != NULL the chassis this node belongs to */
+	struct ibnd_node *next_chassis_node; /* next node in ibnd_chassis_t->nodes */
+	struct ibnd_chassis *chassis; /* if != NULL the chassis this node belongs to */
 	unsigned char ch_type;
 	unsigned char ch_anafanum;
 	unsigned char ch_slotnum;
@@ -83,12 +83,12 @@ typedef struct node {
 /** =========================================================================
  * Port
  */
-typedef struct port {
+typedef struct ibnd_port {
 	uint64_t guid;
 	int portnum;
 	int ext_portnum; /* optional if != 0 external port num */
 	ibnd_node_t *node; /* node this port belongs to */
-	struct port *remoteport; /* null if SMA, or does not exist */
+	struct ibnd_port *remoteport; /* null if SMA, or does not exist */
 	/* quick cache of info below */
 	uint16_t base_lid;
 	uint8_t lmc;
@@ -100,8 +100,8 @@ typedef struct port {
 /** =========================================================================
  * Chassis
  */
-typedef struct chassis {
-	struct chassis *next;
+typedef struct ibnd_chassis {
+	struct ibnd_chassis *next;
 	uint64_t chassisguid;
 	unsigned char chassisnum;
 
@@ -120,7 +120,7 @@ typedef struct chassis {
  * Fabric
  * Main fabric object which is returned and represents the data discovered
  */
-typedef struct ib_fabric {
+typedef struct ibnd_fabric {
 	struct ibmad_port *ibmad_port;
 	/* the node the discover was initiated from
 	 * "from" parameter in ibnd_discover_fabric
-- 
1.5.4.5



More information about the general mailing list