[xen-tools] [PATCH] Argo's Host.pm: getRX/getTX

Ward Vandewege ward at pong.be
Sun Nov 12 20:50:12 CET 2006


Hi Steve,

Here's another patch for the getRX and getTX functions. This is a fix for
interfaces with numbers greater than 9; now they too get the correct values
for RX and TX.

Thanks,
Ward.

-- 
Pong.be         -( "In my opinion M$ is a lot better at making money than  )-
Virtual hosting -(    it is at making good operating systems." -- Linus    )-
http://pong.be  -(                        Torvalds                         )-
GnuPG public key: http://gpg.dtype.org
-------------- next part --------------
--- Host.pm-orig	2006-11-11 16:10:13.000000000 -0500
+++ Host.pm	2006-11-12 14:47:16.000000000 -0500
@@ -594,7 +594,7 @@
     open( NET, "<", "/proc/net/dev" );
     foreach my $line ( <NET> )
     {
-	if ( $line =~ /^vif$id/ )
+	if ( $line =~ /^vif$id\./ )
 	{
 	    if ( $line =~ /(.*):([ \t]*)([0-9]+)/ )
 	    {
@@ -661,7 +661,7 @@
     open( NET, "<", "/proc/net/dev" );
     foreach my $line ( <NET> )
     {
-	if ( $line =~ /^vif$id/ )
+	if ( $line =~ /^vif$id\./ )
 	{
 	    if ( $line =~ /([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)$/ )
 	    {
@@ -674,6 +674,61 @@
     
 }
 


More information about the xen-tools-discuss mailing list