Format capability version properly in the compiler

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6643 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-06-21 23:15:00 +00:00
parent b28153d99c
commit ad8af3d5c3

View File

@ -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";