[ovs-dev] [PATCH] userspace: Log version on startup.
Ethan Jackson
ethan at nicira.com
Mon Jul 16 21:47:17 UTC 2012
It's convenient to have the OVS version directly in the logs so one
doesn't have to go digging through ovs-bugtool output to find it.
Signed-off-by: Ethan Jackson <ethan at nicira.com>
---
lib/util.c | 4 ++--
ovsdb/ovsdb-server.c | 2 ++
vswitchd/ovs-vswitchd.c | 2 ++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/util.c b/lib/util.c
index de3cf3c..56d9bf5 100644
--- a/lib/util.c
+++ b/lib/util.c
@@ -305,12 +305,12 @@ set_program_name__(const char *argv0, const char *version, const char *date,
if (!strcmp(version, VERSION)) {
program_version = xasprintf("%s (Open vSwitch) "VERSION"\n"
- "Compiled %s %s\n",
+ " Compiled %s %s\n",
program_name, date, time);
} else {
program_version = xasprintf("%s %s\n"
"Open vSwitch Library "VERSION"\n"
- "Compiled %s %s\n",
+ " Compiled %s %s\n",
program_name, version, date, time);
}
}
diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c
index 7f53e17..71514a0 100644
--- a/ovsdb/ovsdb-server.c
+++ b/ovsdb/ovsdb-server.c
@@ -105,6 +105,8 @@ main(int argc, char *argv[])
daemonize_start();
+ VLOG_INFO("%s (Open vSwitch) "VERSION, program_name);
+
error = ovsdb_file_open(file_name, false, &db, &file);
if (error) {
ovs_fatal(0, "%s", ovsdb_error_to_string(error));
diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c
index 6062a40..0fede03 100644
--- a/vswitchd/ovs-vswitchd.c
+++ b/vswitchd/ovs-vswitchd.c
@@ -85,6 +85,8 @@ main(int argc, char *argv[])
daemonize_start();
+ VLOG_INFO("%s (Open vSwitch) "VERSION, program_name);
+
if (want_mlockall) {
#ifdef HAVE_MLOCKALL
if (mlockall(MCL_CURRENT | MCL_FUTURE)) {
--
1.7.11.1
More information about the dev
mailing list