[ofa-general] [PATCH] infiniband-diags/ibdiag_common: move get_build_version()

Sasha Khapyorsky sashak at voltaire.com
Thu Jan 22 05:18:12 PST 2009


Move get_build_version() function to source file - so for version change
only relink will be necessary for all tools rather than full rebuild.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 infiniband-diags/include/ibdiag_common.h |    8 +-------
 infiniband-diags/src/ibdiag_common.c     |    6 ++++++
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/infiniband-diags/include/ibdiag_common.h b/infiniband-diags/include/ibdiag_common.h
index 2c81d76..4cc9748 100644
--- a/infiniband-diags/include/ibdiag_common.h
+++ b/infiniband-diags/include/ibdiag_common.h
@@ -48,12 +48,6 @@ extern int ibdebug;
 #define IBERROR(fmt, args...)	iberror(__FUNCTION__, fmt, ## args)
 
 extern void iberror(const char *fn, char *msg, ...);
-
-#include <ibdiag_version.h>
-
-static inline const char *get_build_version(void)
-{
-	return "BUILD VERSION: " IBDIAG_VERSION " Build date: " __DATE__ " " __TIME__;
-}
+extern const char *get_build_version(void);
 
 #endif				/* _IBDIAG_COMMON_H_ */
diff --git a/infiniband-diags/src/ibdiag_common.c b/infiniband-diags/src/ibdiag_common.c
index 37b60cf..ec22204 100644
--- a/infiniband-diags/src/ibdiag_common.c
+++ b/infiniband-diags/src/ibdiag_common.c
@@ -48,6 +48,7 @@
 #include <config.h>
 
 #include <ibdiag_common.h>
+#include <ibdiag_version.h>
 
 int ibdebug;
 
@@ -73,3 +74,8 @@ void iberror(const char *fn, char *msg, ...)
 
 	exit(-1);
 }
+
+const char *get_build_version(void)
+{
+	return "BUILD VERSION: " IBDIAG_VERSION " Build date: " __DATE__ " " __TIME__;
+}
-- 
1.6.0.4.766.g6fc4a




More information about the general mailing list