[ofa-general] [PATCH] opensm: osm_subnet.c log and print the path of the cached option file

Timothy A. Meier meier3 at llnl.gov
Thu Jan 24 12:28:46 PST 2008


Sasha,

A trivial patch.  During development, we (at LLNL) sometimes use different
options/configurations.  This provides a way to know which one is active.


 From d60408b4dc1cb0c917e2eb33d6a3f62ac6bb9b5c Mon Sep 17 00:00:00 2001
From: Tim Meier <meier3 at llnl.gov>
Date: Thu, 24 Jan 2008 11:51:08 -0800
Subject: [PATCH] opensm: osm_subnet.c  log and print the path of the cached option file

Logged (syslog and print) the path to the option file that is cached and parsed.
This is helpful when something other than the default path is used.

Signed-off-by: Tim Meier <meier3 at llnl.gov>
---
  opensm/opensm/osm_subnet.c |    4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
index 7b14e0c..bae087d 100644
--- a/opensm/opensm/osm_subnet.c
+++ b/opensm/opensm/osm_subnet.c
@@ -1175,6 +1175,10 @@ ib_api_status_t osm_subn_parse_conf_file(IN osm_subn_opt_t * const p_opts)
                        file_name, strerror(errno));
                 return IB_ERROR;
         }
+       sprintf(line, " Reading Cached Option File: %s\n", file_name);
+       printf(line);
+       cl_log_event("OpenSM", CL_LOG_INFO, line, NULL, 0);
+

         while (fgets(line, 1023, opts_file) != NULL) {
                 /* get the first token */
--
1.5.1

-- 
Timothy A. Meier
Computer Scientist
ICCD/High Performance Computing
925.422.3341
meier3 at llnl.gov
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-opensm-osm_subnet.c-log-and-print-the-path-of-the.patch
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20080124/fe666706/attachment.ksh>


More information about the general mailing list