diff options
author | John Southworth <john.southworth@vyatta.com> | 2012-05-09 08:51:38 -0700 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2012-05-09 08:51:38 -0700 |
commit | 8e65d060aa5ad4544313238c5295c018d3031218 (patch) | |
tree | 5192c1043673d7c8e5f88922f071ee01ad58841a | |
parent | de1d75bdec0b7785f4ad5ff75e3614aa4e4f9284 (diff) | |
download | vyatta-op-8e65d060aa5ad4544313238c5295c018d3031218.tar.gz vyatta-op-8e65d060aa5ad4544313238c5295c018d3031218.zip |
Moved get_terminal_width to Vyatta::Misc
-rwxr-xr-x | scripts/vyatta-show-interfaces.pl | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/scripts/vyatta-show-interfaces.pl b/scripts/vyatta-show-interfaces.pl index 3a9f1cc..b8a5ae6 100755 --- a/scripts/vyatta-show-interfaces.pl +++ b/scripts/vyatta-show-interfaces.pl @@ -24,7 +24,6 @@ # use lib "/opt/vyatta/share/perl5/"; -require 'sys/ioctl.ph'; use Vyatta::Interface; use Vyatta::Misc; @@ -55,17 +54,6 @@ my @rx_stat_vars = my @tx_stat_vars = qw/tx_bytes tx_packets tx_errors tx_dropped tx_carrier_errors collisions/; -sub get_terminal_width { - my $winsize = ''; - open(my $TTY, '>', '/dev/tty'); - # undefined if output not going to terminal - return unless (ioctl($TTY, &TIOCGWINSZ, $winsize)); - close($TTY); - - my ($rows, $cols, undef, undef) = unpack('S4', $winsize); - return $cols; -} - sub get_intf_description { my $name = shift; my $description = interface_description($name); |