[ovs-dev] [PATCH 10/17] util: ovs_print_version(): Show names of OpenFlow versions
Simon Horman
horms at verge.net.au
Thu Oct 4 02:41:25 UTC 2012
For backwards-compatibility also show the OpenFlow versions in hex
Signed-off-by: Simon Horman <horms at verge.net.au>
---
lib/util.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/util.c b/lib/util.c
index c90d556..f9fb543 100644
--- a/lib/util.c
+++ b/lib/util.c
@@ -28,6 +28,7 @@
#include <unistd.h>
#include "byte-order.h"
#include "coverage.h"
+#include "lib/ofp-util.h"
#include "openvswitch/types.h"
#include "vlog.h"
@@ -347,8 +348,12 @@ void
ovs_print_version(uint8_t min_ofp, uint8_t max_ofp)
{
printf("%s", program_version);
- if (min_ofp || max_ofp) {
+ if (min_ofp && max_ofp) {
printf("OpenFlow versions %#x:%#x\n", min_ofp, max_ofp);
+ printf("Minimum OpenFlow version %s\n",
+ ofputil_version_to_string(min_ofp));
+ printf("Maximum OpenFlow version %s\n",
+ ofputil_version_to_string(max_ofp));
}
}
--
1.7.10.4
More information about the dev
mailing list