[ofa-general] [PATCH 7/7] Add node_name_map_name to opts file.

Ira Weiny weiny2 at llnl.gov
Thu Nov 1 20:15:31 PDT 2007


>From 2f88e7db6e2553cac310209e0679e099e1a97576 Mon Sep 17 00:00:00 2001
From: Ira K. Weiny <weiny2 at llnl.gov>
Date: Thu, 1 Nov 2007 19:48:40 -0700
Subject: [PATCH] Add node_name_map_name to opts file.

Signed-off-by: Ira K. Weiny <weiny2 at llnl.gov>
---
 opensm/opensm/osm_opensm.c |    2 +-
 opensm/opensm/osm_subnet.c |   10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/opensm/opensm/osm_opensm.c b/opensm/opensm/osm_opensm.c
index 9841c75..d442340 100644
--- a/opensm/opensm/osm_opensm.c
+++ b/opensm/opensm/osm_opensm.c
@@ -312,7 +312,7 @@ osm_opensm_init(IN osm_opensm_t * const p_osm,
 		goto Exit;
 	}
 
-	p_osm->node_name_map = open_node_name_map(NULL);
+	p_osm->node_name_map = open_node_name_map(p_opt->node_name_map_name);
 
       Exit:
 	osm_log(&p_osm->log, OSM_LOG_FUNCS, "osm_opensm_init: ]\n");	/* Format Waived */
diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
index 7fb21fd..7114305 100644
--- a/opensm/opensm/osm_subnet.c
+++ b/opensm/opensm/osm_subnet.c
@@ -445,6 +445,7 @@ void osm_subn_set_default_opt(IN osm_subn_opt_t * const p_opt)
 #endif				/* ENABLE_OSM_PERF_MGR */
 
 	p_opt->event_plugin_name = OSM_DEFAULT_EVENT_PLUGIN_NAME;
+	p_opt->node_name_map_name = NULL;
 
 	p_opt->dump_files_dir = getenv("OSM_TMP_DIR");
 	if (!p_opt->dump_files_dir || !(*p_opt->dump_files_dir))
@@ -1250,6 +1251,9 @@ ib_api_status_t osm_subn_parse_conf_file(IN osm_subn_opt_t * const p_opts)
 		opts_unpack_charp("event_plugin_name",
 				  p_key, p_val, &p_opts->event_plugin_name);
 
+		opts_unpack_charp("node_name_map_name",
+				  p_key, p_val, &p_opts->node_name_map_name);
+
 		subn_parse_qos_options("qos",
 				       p_key, p_val, &p_opts->qos_options);
 
@@ -1509,6 +1513,12 @@ ib_api_status_t osm_subn_write_conf_file(IN osm_subn_opt_t * const p_opts)
 		"event_plugin_name %s\n\n", p_opts->event_plugin_name);
 
 	fprintf(opts_file,
+		"#\n# Node name map for mapping node's to more descirptive node descriptors\n"
+		"# (man ibnetdiscover for more information)\n#\n"
+		"node_name_map_name %s\n\n",
+		p_opts->node_name_map_name ? p_opts->node_name_map_name : "(null)");
+
+	fprintf(opts_file,
 		"#\n# DEBUG FEATURES\n#\n"
 		"# The log flags used\n"
 		"log_flags 0x%02x\n\n"
-- 
1.5.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-Add-node_name_map_name-to-opts-file.patch
Type: application/octet-stream
Size: 2260 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20071101/2cf1ee2c/attachment.obj>


More information about the general mailing list