Compile/Version info in sysconfig master info file.
authorFlorian Pose <fp@igh-essen.com>
Fri, 08 Sep 2006 12:51:04 +0000
changeset 356 4bdc4f2e1a93
parent 355 3a652b240c48
child 357 277de5572f99
Compile/Version info in sysconfig master info file.
master/globals.h
master/master.c
master/module.c
--- a/master/globals.h	Mon Sep 04 08:29:11 2006 +0000
+++ b/master/globals.h	Fri Sep 08 12:51:04 2006 +0000
@@ -56,6 +56,15 @@
 /** master extra version (just a string) */
 #define EC_MASTER_VERSION_EXTRA "trunk"
 
+/** Compile version info. */
+
+#define EC_COMPILE_INFO EC_STR(EC_MASTER_VERSION_MAIN) \
+                        "." EC_STR(EC_MASTER_VERSION_SUB) \
+                        " (" EC_MASTER_VERSION_EXTRA ")" \
+                        " - rev. " EC_STR(SVNREV) \
+                        ", compiled by " EC_STR(USER) \
+                        " at " __DATE__ " " __TIME__
+
 /** maximum number of FMMUs per slave */
 #define EC_MAX_FMMUS 16
 
--- a/master/master.c	Mon Sep 04 08:29:11 2006 +0000
+++ b/master/master.c	Fri Sep 08 12:51:04 2006 +0000
@@ -705,6 +705,7 @@
     ec_eoe_t *eoe;
     uint32_t cur, sum, min, max, pos, i;
 
+    off += sprintf(buffer + off, "\nVersion: " EC_COMPILE_INFO);
     off += sprintf(buffer + off, "\nMode: ");
     switch (master->mode) {
         case EC_MASTER_MODE_ORPHANED:
--- a/master/module.c	Mon Sep 04 08:29:11 2006 +0000
+++ b/master/module.c	Fri Sep 08 12:51:04 2006 +0000
@@ -53,19 +53,6 @@
 
 /*****************************************************************************/
 
-/**
-   Compile version info.
-*/
-
-#define COMPILE_INFO EC_STR(EC_MASTER_VERSION_MAIN) \
-                     "." EC_STR(EC_MASTER_VERSION_SUB) \
-                     " (" EC_MASTER_VERSION_EXTRA ")" \
-                     " - rev. " EC_STR(SVNREV) \
-                     ", compiled by " EC_STR(USER) \
-                     " at " __DATE__ " " __TIME__
-
-/*****************************************************************************/
-
 static int ec_master_count = 1; /**< parameter value, number of masters */
 static int ec_eoeif_count = 0; /**< parameter value, number of EoE interf. */
 static struct list_head ec_masters; /**< list of masters */
@@ -80,7 +67,7 @@
 MODULE_AUTHOR("Florian Pose <fp@igh-essen.com>");
 MODULE_DESCRIPTION("EtherCAT master driver module");
 MODULE_LICENSE("GPL");
-MODULE_VERSION(COMPILE_INFO);
+MODULE_VERSION(EC_COMPILE_INFO);
 MODULE_PARM_DESC(ec_master_count, "number of EtherCAT masters to initialize");
 MODULE_PARM_DESC(ec_eoeif_count, "number of EoE interfaces per master");
 
@@ -99,7 +86,7 @@
     unsigned int i;
     ec_master_t *master, *next;
 
-    EC_INFO("Master driver, %s\n", COMPILE_INFO);
+    EC_INFO("Master driver, %s\n", EC_COMPILE_INFO);
 
     if (ec_master_count < 1) {
         EC_ERR("Error - Invalid ec_master_count: %i\n", ec_master_count);