[ofa-general] [PATCH 6/7] Add --with-partitions-conf to configure

Ira Weiny weiny2 at llnl.gov
Tue Nov 13 16:09:00 PST 2007


>From 2d1d28ca45cc47e3de2bf4c23a5321f15cabd804 Mon Sep 17 00:00:00 2001
From: Ira K. Weiny <weiny2 at llnl.gov>
Date: Sun, 11 Nov 2007 18:12:35 -0800
Subject: [PATCH] Add --with-partitions-conf to configure.

   As well as adding this option, change the default location/name for this
   file to be <sysconfdir>/<opensm-conf-sub-dir>/<file> to be consistent with
   other config files.

Signed-off-by: Ira K. Weiny <weiny2 at llnl.gov>
---
 opensm/configure.in              |   20 ++++++++++++++++++++
 opensm/include/opensm/osm_base.h |   10 +++++++---
 2 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/opensm/configure.in b/opensm/configure.in
index 14fd60a..8e56cc7 100644
--- a/opensm/configure.in
+++ b/opensm/configure.in
@@ -112,6 +112,26 @@ AC_DEFINE_UNQUOTED(HAVE_DEFAULT_NODENAME_MAP,
 	["$CONF_DIR/$NODENAMEMAPFILE"],
 	[Define a default node name map file])
 
+dnl Check for a different partition conf file
+PARTITION_CONFIG_FILE=partitions.conf
+AC_MSG_CHECKING(for --with-partitions-conf)
+AC_ARG_WITH(partitions-conf,
+    AC_HELP_STRING([--with-partitions-conf=file],
+                   [define a partitions config file (default partitions.conf)]),
+    [ case "$withval" in
+    no)
+        ;;
+    *)
+        withpartitionsconf=yes
+        PARTITION_CONFIG_FILE=$withval
+        ;;
+    esac ]
+)
+AC_MSG_RESULT(${withpartitionsconf=no})
+AC_DEFINE_UNQUOTED(HAVE_DEFAULT_PARTITION_CONFIG_FILE,
+	["$CONF_DIR/$PARTITION_CONFIG_FILE"],
+	[Define a QOS policy config file])
+
 dnl Check for a different QOS policy file
 QOS_POLICY_FILE=qos-policy.conf
 AC_MSG_CHECKING(for --with-qos-policy-conf)
diff --git a/opensm/include/opensm/osm_base.h b/opensm/include/opensm/osm_base.h
index c8695a0..aa8d378 100644
--- a/opensm/include/opensm/osm_base.h
+++ b/opensm/include/opensm/osm_base.h
@@ -224,9 +224,13 @@ BEGIN_C_DECLS
 */
 #ifdef __WIN__
 #define OSM_DEFAULT_PARTITION_CONFIG_FILE strcat(GetOsmCachePath(), "osm-partitions.conf")
-#else
-#define OSM_DEFAULT_PARTITION_CONFIG_FILE "/etc/ofa/opensm-partitions.conf"
-#endif
+#else /* !__WIN__ */
+#   ifdef HAVE_DEFAULT_PARTITION_CONFIG_FILE
+#      define OSM_DEFAULT_PARTITION_CONFIG_FILE HAVE_DEFAULT_PARTITION_CONFIG_FILE
+#   else /* !HAVE_DEFAULT_PARTITION_CONFIG_FILE */
+#      define OSM_DEFAULT_PARTITION_CONFIG_FILE "/etc/ofa/opensm-partitions.conf"
+#   endif /* HAVE_DEFAULT_PARTITION_CONFIG_FILE */
+#endif /* __WIN__ */
 /***********/
 
 /****d* OpenSM: Base/OSM_DEFAULT_QOS_POLICY_FILE
-- 
1.5.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Add-with-partitions-conf-to-configure.patch
Type: application/octet-stream
Size: 2492 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20071113/e572c324/attachment.obj>


More information about the general mailing list