From 70d55c3c9e44ad501442ea879f4fdcba9c59963f Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 4 Mar 2008 17:41:49 -0800 Subject: remove dead code in qos script The function validate_name is no longer used. --- scripts/vyatta-qos.pl | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'scripts/vyatta-qos.pl') diff --git a/scripts/vyatta-qos.pl b/scripts/vyatta-qos.pl index ddbefe9..db4d7bd 100755 --- a/scripts/vyatta-qos.pl +++ b/scripts/vyatta-qos.pl @@ -38,25 +38,6 @@ sub list_policy { print join( ' ', @nodes ), "\n"; } -## check if name is okay -sub validate_name { - my ($policy, $name) = @_; - my $config = new VyattaConfig; - - ($name =~ '^\w[\w_-]*$') or die "Invalid policy name $name\n"; - - foreach my $p ($config->listNodes($qosNode) ) { - if ($p ne $policy) { - foreach my $n ($config->listNodes("$qosNode $policy") ) { - if ($n eq $name) { - die "Name $name is already in use by $p\n"; - } - } - } - } -} - - ## delete_interface('eth0', 'out') # remove all filters and qdisc's sub delete_interface { -- cgit v1.2.3