Delete unused find_interfaces_by_option1()

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2017-12-23 10:53:16 -08:00
parent 229c47ac6c
commit 24acf25451
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -90,7 +90,6 @@ our @EXPORT = ( qw( NOTHING
interface_is_optional
interface_is_required
find_interfaces_by_option
find_interfaces_by_option1
get_interface_option
get_interface_origin
interface_has_option
@ -1892,35 +1891,6 @@ sub find_interfaces_by_option( $;$ ) {
\@ints;
}
#
# Returns reference to array of interfaces with the passed option. Unlike the preceding function, this one:
#
# - All entries in %interfaces are searched.
# - Returns a two-element list; the second element indicates whether any members of the list have wildcard physical names
#
sub find_interfaces_by_option1( $ ) {
my $option = $_[0];
my @ints = ();
my $wild = 0;
for my $interface ( @interfaces ) {
my $interfaceref = $interfaces{$interface};
next unless defined $interfaceref->{physical};
my $optionsref = $interfaceref->{options};
if ( $optionsref && defined $optionsref->{$option} ) {
$wild ||= $interfaceref->{wildcard};
push @ints , $interface
}
}
return unless defined wantarray;
wantarray ? ( \@ints, $wild ) : \@ints;
}
#
# Return the value of an option for an interface
#