From ad8af3d5c346d657c0431a8b04d839ae061b7ddb Mon Sep 17 00:00:00 2001 From: teastep Date: Thu, 21 Jun 2007 23:15:00 +0000 Subject: [PATCH] Format capability version properly in the compiler git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6643 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Config.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Shorewall-perl/Shorewall/Config.pm b/Shorewall-perl/Shorewall/Config.pm index fb044ea4c..9ebccc7d2 100644 --- a/Shorewall-perl/Shorewall/Config.pm +++ b/Shorewall-perl/Shorewall/Config.pm @@ -701,7 +701,12 @@ sub report_capabilities() { sub report_capability( $ ) { my $cap = $_[0]; print " $capdesc{$cap}: "; - print $capabilities{$cap} ? "Available\n" : "Not Available\n"; + if ( $cap eq 'CAPVERSION' ) { + my $version = $capabilities{CAPVERSION}; + printf "%d.%d.%d\n", int( $version / 10000 ) , int ( ( $version % 10000 ) / 100 ) , int ( $version % 100 ); + } else { + print $capabilities{$cap} ? "Available\n" : "Not Available\n"; + } } print "Shorewall has detected the following capabilities:\n";