[ofa-general] [PATCH] Fix regexp's for new ibnetdiscover output

Ira Weiny weiny2 at llnl.gov
Fri Sep 7 15:21:21 PDT 2007


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 <weiny2 at llnl.gov>
Date: Fri, 7 Sep 2007 14:34:09 -0700
Subject: [PATCH] Fix regexp's for new ibnetdiscover output

Signed-off-by: Ira K. Weiny <weiny2 at llnl.gov>
---
 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-regexp-s-for-new-ibnetdiscover-output.patch
Type: application/octet-stream
Size: 2598 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20070907/1fe9e29c/attachment.obj>


More information about the general mailing list