version: Update to version 2.1.0

Update to package version V2.1.0 to reflect that a backwards compatible
API change was made. This API change was the introduction of the timeout
to the GET_MBOX_INFO command.

This version update also encompasses previous bug fixes.

The versioning scheme is now aligned to semver.

Use the version from config.h for both mboxd and mboxctl instead of an
independant value for the daemon and control programs.

Change-Id: I12d7fe8e40697801594b1727054342613923a784
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
diff --git a/configure.ac b/configure.ac
index 68148a7..e9512b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 # Initialization
 AC_PREREQ([2.69])
-AC_INIT([mboxd], [1.0], [https://github.com/openbmc/mboxbridge/issues])
+AC_INIT([mboxd], [2.1.0], [https://github.com/openbmc/mboxbridge/issues])
 AC_CONFIG_HEADERS([config.h])
 AM_INIT_AUTOMAKE([subdir-objects -Wall foreign dist-xz])
 AM_SILENT_RULES([yes])
diff --git a/mbox.h b/mbox.h
index be9b953..556994f 100644
--- a/mbox.h
+++ b/mbox.h
@@ -33,7 +33,6 @@
 #define API_MAX_VERSION			API_VERSION_2
 
 #define THIS_NAME			"Mailbox Daemon"
-#define SUB_VERSION			0
 
 /* Command Values */
 #define MBOX_C_RESET_STATE		0x01
diff --git a/mboxctl.c b/mboxctl.c
index ca6d9ad..6e8bf15 100644
--- a/mboxctl.c
+++ b/mboxctl.c
@@ -42,6 +42,7 @@
 
 #include <systemd/sd-bus.h>
 
+#include "config.h"
 #include "dbus.h"
 
 #define USAGE \
@@ -59,9 +60,7 @@
 "\t\t\targ[0]: < \"clean\" | \"modified\" >\n" \
 "\t\t--clear-cache\t- tell the daemon to discard any caches (0)\n"
 
-#define NAME		"MBOX Control"
-#define VERSION		1
-#define SUBVERSION	0
+#define NAME		"Mailbox Control"
 
 static bool silent;
 
@@ -449,7 +448,7 @@
 			rc = handle_cmd_modified(context);
 			break;
 		case 'v':
-			MSG_OUT("%s V%d.%.2d\n", NAME, VERSION, SUBVERSION);
+			MSG_OUT("%s V%s\n", NAME, PACKAGE_VERSION);
 			rc = 0;
 			break;
 		case 'h':
diff --git a/mboxd.c b/mboxd.c
index e5b6fe8..5f851df 100644
--- a/mboxd.c
+++ b/mboxd.c
@@ -42,6 +42,7 @@
 #include <inttypes.h>
 #include <systemd/sd-bus.h>
 
+#include "config.h"
 #include "mbox.h"
 #include "common.h"
 #include "dbus.h"
@@ -261,8 +262,7 @@
 			}
 			break;
 		case 'V':
-			printf("%s v%d.%.2d\n", THIS_NAME, API_MAX_VERSION,
-						SUB_VERSION);
+			printf("%s V%s\n", THIS_NAME, PACKAGE_VERSION);
 			exit(0);
 		case 'h':
 			return false; /* This will print the usage message */