[openib-general] [PATCH] OpenSM: Remove use of osm_svn_revision.h

Hal Rosenstock halr at voltaire.com
Thu Dec 28 07:06:50 PST 2006


OpenSM: Remove use of osm_svn_revision.h

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

diff --git a/osm/opensm/Makefile.am b/osm/opensm/Makefile.am
index 3ef246c..aed60d7 100644
--- a/osm/opensm/Makefile.am
+++ b/osm/opensm/Makefile.am
@@ -10,27 +10,6 @@ DBGFLAGS = -g
 endif
 
 if OSMV_OPENIB
-BUILT_SOURCES = $(srcdir)/../include/opensm/osm_svn_revision.h
-.PHONY: always
-$(srcdir)/../include/opensm/osm_svn_revision.h: always
-	echo -n "#define OSM_SVN_REVISION \"" >$(srcdir)/../include/opensm/osm_svn_revision_new.h ; \
-	if test '!' -d '$(srcdir)/.svn'; then \
-		echo -n Exported revision >> $(srcdir)/../include/opensm/osm_svn_revision_new.h ; \
-	else \
-		svnversion -n $(srcdir)/.. >> $(srcdir)/../include/opensm/osm_svn_revision_new.h ; \
-	fi ; \
-	echo "\"" >> $(srcdir)/../include/opensm/osm_svn_revision_new.h ; \
-	if cmp -s $(srcdir)/../include/opensm/osm_svn_revision_new.h \
-		  $(srcdir)/../include/opensm/osm_svn_revision.h ; \
-	then \
-		rm $(srcdir)/../include/opensm/osm_svn_revision_new.h ; \
-	else \
-		mv $(srcdir)/../include/opensm/osm_svn_revision_new.h \
-		   $(srcdir)/../include/opensm/osm_svn_revision.h ; \
-	fi
-endif
-
-if OSMV_OPENIB
 libopensm_la_CFLAGS = -Wall $(OSMV_CFLAGS) -DVENDOR_RMPP_SUPPORT -DDUAL_SIDED_RMPP $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1
 else
 libopensm_la_CFLAGS = -Wall $(OSMV_CFLAGS) -DVENDOR_RMPP_SUPPORT $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1
diff --git a/osm/opensm/main.c b/osm/opensm/main.c
index bc916ab..ee09db0 100644
--- a/osm/opensm/main.c
+++ b/osm/opensm/main.c
@@ -54,9 +54,6 @@
 #include <complib/cl_debug.h>
 #include <vendor/osm_vendor_api.h>
 #include <opensm/osm_version.h>
-#ifdef OSM_VENDOR_INTF_OPENIB
-#include <opensm/osm_svn_revision.h>
-#endif
 #include <opensm/osm_opensm.h>
 #include <opensm/osm_console.h>
 
@@ -599,10 +596,6 @@ main(
 
   printf("-------------------------------------------------\n");
   printf("%s\n", OSM_VERSION);
-#if defined ( OSM_VENDOR_INTF_OPENIB )
-  if (strlen(OSM_SVN_REVISION))
-     printf("Based on OpenIB svn %s\n", OSM_SVN_REVISION);
-#endif
 
   osm_subn_set_default_opt(&opt);
   osm_subn_parse_conf_file(&opt);
diff --git a/osm/opensm/osm_opensm.c b/osm/opensm/osm_opensm.c
index 9cac636..0061193 100644
--- a/osm/opensm/osm_opensm.c
+++ b/osm/opensm/osm_opensm.c
@@ -57,9 +57,6 @@
 #include <complib/cl_passivelock.h>
 #include <vendor/osm_vendor_api.h>
 #include <opensm/osm_version.h>
-#ifdef OSM_VENDOR_INTF_OPENIB
-#include <opensm/osm_svn_revision.h>
-#endif
 #include <opensm/osm_base.h>
 #include <opensm/osm_opensm.h>
 #include <opensm/osm_log.h>
@@ -204,33 +201,12 @@ osm_opensm_init(
    if( status != IB_SUCCESS )
       return ( status );
 
-#ifndef OSM_VENDOR_INTF_OPENIB
    /* If there is a log level defined - add the OSM_VERSION to it. */
    osm_log( &p_osm->log,
             osm_log_get_level( &p_osm->log ) & ( OSM_LOG_SYS ^ 0xFF ), "%s\n",
             OSM_VERSION );
    /* Write the OSM_VERSION to the SYS_LOG */
    osm_log( &p_osm->log, OSM_LOG_SYS, "%s\n", OSM_VERSION );   /* Format Waived */
-#else
-   if (strlen(OSM_SVN_REVISION))
-   {
-      /* If there is a log level defined - add OSM_VERSION and OSM_SVN_REVISION to it. */
-      osm_log( &p_osm->log,
-               osm_log_get_level( &p_osm->log ) & ( OSM_LOG_SYS ^ 0xFF ), "%s OpenIB svn %s\n",
-               OSM_VERSION, OSM_SVN_REVISION );
-      /* Write the OSM_VERSION and OSM_SVN_REVISION to the SYS_LOG */
-      osm_log( &p_osm->log, OSM_LOG_SYS, "%s OpenIB svn %s\n", OSM_VERSION, OSM_SVN_REVISION );   /* Format Waived */
-   }
-   else
-   {
-      /* If there is a log level defined - add the OSM_VERSION to it. */
-      osm_log( &p_osm->log,
-               osm_log_get_level( &p_osm->log ) & ( OSM_LOG_SYS ^ 0xFF ), "%s\n",
-               OSM_VERSION );
-      /* Write the OSM_VERSION to the SYS_LOG */
-      osm_log( &p_osm->log, OSM_LOG_SYS, "%s\n", OSM_VERSION );   /* Format Waived */
-   }
-#endif
 
    osm_log( &p_osm->log, OSM_LOG_FUNCS, "osm_opensm_init: [\n" ); /* Format Waived */
 







More information about the general mailing list