The ibnetdiscover output has changed so this command was failing.  I am not 
sure when this happened but not matter this should fix it.

Ira


>From 9aadfb84826a5ea31107624b4b29e90d7c97e55b Mon Sep 17 00:00:00 2001
From: Ira K. Weiny <[EMAIL PROTECTED]>
Date: Fri, 7 Sep 2007 14:34:09 -0700
Subject: [PATCH] Fix regexp's for new ibnetdiscover output

Signed-off-by: Ira K. Weiny <[EMAIL PROTECTED]>
---
 infiniband-diags/scripts/IBswcountlimits.pm |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/infiniband-diags/scripts/IBswcountlimits.pm 
b/infiniband-diags/scripts/IBswcountlimits.pm
index 6cfa76c..f1e16d2 100755
--- a/infiniband-diags/scripts/IBswcountlimits.pm
+++ b/infiniband-diags/scripts/IBswcountlimits.pm
@@ -251,7 +251,7 @@ sub get_link_ends
       if ( $in_switch eq "yes" )
       {
         my $rec = undef;
-         if ($line =~ /^\[(\d+)\]\s+\"[HSR]-(.+)\"\[(\d+)\]\s+#.*\"(.*)\"\.* 
lid (\d+).*/)
+         if ($line =~ 
/^\[(\d+)\]\s+\"[HSR]-(.+)\"\[(\d+)\]\(.+\)\s+#.*\"(.*)\"\.* lid (\d+).*/)
          {
             $loc_port = $1;
             my $rem_guid = $2;
@@ -262,7 +262,7 @@ sub get_link_ends
                         loc_sw_lid => $loc_sw_lid,
                   rem_guid => "0x$rem_guid", rem_lid => $rem_lid, rem_port => 
$rem_port, rem_ext_port => "", rem_desc => $rem_desc };
          }
-         if ($line =~ /^\[(\d+)\]\[ext 
(\d+)\]\s+\"[HSR]-(.+)\"\[(\d+)\]\s+#.*\"(.*)\"\.* lid (\d+).*/)
+         if ($line =~ /^\[(\d+)\]\[ext 
(\d+)\]\s+\"[HSR]-(.+)\"\[(\d+)\]\(.+\)\s+#.*\"(.*)\"\.* lid (\d+).*/)
          {
             $loc_port = $1;
             my $loc_ext_port = $2;
@@ -274,7 +274,7 @@ sub get_link_ends
                         loc_sw_lid => $loc_sw_lid,
                   rem_guid => "0x$rem_guid", rem_lid => $rem_lid, rem_port => 
$rem_port, rem_ext_port => "", rem_desc => $rem_desc };
          }
-         if ($line =~ /^\[(\d+)\]\s+\"[HSR]-(.+)\"\[(\d+)\]\[ext 
(\d+)\]\s+#.*\"(.*)\"\.* lid (\d+).*/)
+         if ($line =~ /^\[(\d+)\]\s+\"[HSR]-(.+)\"\[(\d+)\]\[ext 
(\d+)\]\(.+\)\s+#.*\"(.*)\"\.* lid (\d+).*/)
          {
             $loc_port = $1;
             my $rem_guid = $2;
@@ -286,7 +286,7 @@ sub get_link_ends
                         loc_sw_lid => $loc_sw_lid,
                   rem_guid => "0x$rem_guid", rem_lid => $rem_lid, rem_port => 
$rem_port, rem_ext_port => $rem_ext_port, rem_desc => $rem_desc };
          }
-         if ($line =~ /^\[(\d+)\]\[ext (\d+)\]\s+\"[HSR]-(.+)\"\[(\d+)\]\[ext 
(\d+)\]\s+#.*\"(.*)\"\.* lid (\d+).*/)
+         if ($line =~ /^\[(\d+)\]\[ext (\d+)\]\s+\"[HSR]-(.+)\"\[(\d+)\]\[ext 
(\d+)\]\(.+\)\s+#.*\"(.*)\"\.* lid (\d+).*/)
          {
             $loc_port = $1;
             my $loc_ext_port = $2;
-- 
1.5.1

Attachment: 0001-Fix-regexp-s-for-new-ibnetdiscover-output.patch
Description: Binary data

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to