[ofa-general] [PATCH] infiniband-diags/scripts: Eliminate some duplicated messages

Hal Rosenstock hrosenstock at xsigo.com
Tue Oct 23 06:05:44 PDT 2007


infiniband-diags/scripts: Eliminate some duplicated messages

Signed-off-by: Hal Rosenstock <hal at xsigo.com>

diff --git a/infiniband-diags/scripts/ibcheckerrors.in b/infiniband-diags/scripts/ibcheckerrors.in
index ebf44ec..cac2475 100644
--- a/infiniband-diags/scripts/ibcheckerrors.in
+++ b/infiniband-diags/scripts/ibcheckerrors.in
@@ -131,7 +131,7 @@ function check_node(lid)
 			}
 }
 
-/^ib/	{print $0}
+/^ib/	{print $0; next}
 /ibpanic:/	{print $0}
 /ibwarn:/	{print $0}
 /iberror:/	{print $0}
diff --git a/infiniband-diags/scripts/ibcheckerrs.in b/infiniband-diags/scripts/ibcheckerrs.in
index 1a2d228..305379a 100644
--- a/infiniband-diags/scripts/ibcheckerrs.in
+++ b/infiniband-diags/scripts/ibcheckerrs.in
@@ -188,7 +188,7 @@ BEGIN {
 
 /AllPortSelect/ {next}
 
-/^ib/  {print $0}
+/^ib/  {print $0; next}
 /ibpanic:/     {print $0}
 /ibwarn:/      {print $0}
 /iberror:/     {print $0}
diff --git a/infiniband-diags/scripts/ibchecknet.in b/infiniband-diags/scripts/ibchecknet.in
index a47ab8e..b6e0945 100644
--- a/infiniband-diags/scripts/ibchecknet.in
+++ b/infiniband-diags/scripts/ibchecknet.in
@@ -132,7 +132,7 @@ function check_node(lid)
 			}
 }
 
-/^ib/	{print $0}
+/^ib/	{print $0; next}
 /ibpanic:/	{print $0}
 /ibwarn:/	{print $0}
 /iberror:/	{print $0}
diff --git a/infiniband-diags/scripts/ibcheckport.in b/infiniband-diags/scripts/ibcheckport.in
index 94cfc6c..fa5e81e 100644
--- a/infiniband-diags/scripts/ibcheckport.in
+++ b/infiniband-diags/scripts/ibcheckport.in
@@ -116,7 +116,7 @@ function blue(s)
 
 #/^LocalPort/	{ if ($2 != '$portnum') {err = err "#error: port " $2 " does not match query ('$portnum')\n"; exit -1}}
 
-/^ib/	{print $0}
+/^ib/	{print $0; next}
 /ibpanic:/	{print $0}
 /ibwarn:/	{print $0}
 /iberror:/	{print $0}
diff --git a/infiniband-diags/scripts/ibcheckportstate.in b/infiniband-diags/scripts/ibcheckportstate.in
index 2931f06..47e72dc 100644
--- a/infiniband-diags/scripts/ibcheckportstate.in
+++ b/infiniband-diags/scripts/ibcheckportstate.in
@@ -108,7 +108,7 @@ function blue(s)
 
 /^LinkState/{ if ($2 != "Active") warn = warn "#warn: Logical link state is " $2 "  lid '$lid' port '$portnum'\n"}
 
-/^ib/	{print $0}
+/^ib/	{print $0; next}
 /ibpanic:/	{print $0}
 /ibwarn:/	{print $0}
 /iberror:/	{print $0}
diff --git a/infiniband-diags/scripts/ibcheckportwidth.in b/infiniband-diags/scripts/ibcheckportwidth.in
index 84f1ef7..32c5c5e 100644
--- a/infiniband-diags/scripts/ibcheckportwidth.in
+++ b/infiniband-diags/scripts/ibcheckportwidth.in
@@ -106,7 +106,7 @@ function blue(s)
 /^LinkWidthSupported/{ if ($2 != "1X") { next } }
 /^LinkWidthActive/{ if ($2 == "1X") warn = warn "#warn: Link configured as 1X  lid '$lid' port '$portnum'\n"}
 
-/^ib/	{print $0}
+/^ib/	{print $0; next}
 /ibpanic:/	{print $0}
 /ibwarn:/	{print $0}
 /iberror:/	{print $0}
diff --git a/infiniband-diags/scripts/ibcheckstate.in b/infiniband-diags/scripts/ibcheckstate.in
index 6ce0854..63551d5 100644
--- a/infiniband-diags/scripts/ibcheckstate.in
+++ b/infiniband-diags/scripts/ibcheckstate.in
@@ -122,7 +122,7 @@ function check_node(lid)
 		}
 }
 
-/^ib/	{print $0}
+/^ib/	{print $0; next}
 /ibpanic:/	{print $0}
 /ibwarn:/	{print $0}
 /iberror:/	{print $0}
diff --git a/infiniband-diags/scripts/ibcheckwidth.in b/infiniband-diags/scripts/ibcheckwidth.in
index f8f6a8b..6b723c5 100644
--- a/infiniband-diags/scripts/ibcheckwidth.in
+++ b/infiniband-diags/scripts/ibcheckwidth.in
@@ -122,7 +122,7 @@ function check_node(lid)
 		}
 }
 
-/^ib/	{print $0}
+/^ib/	{print $0; next}
 /ibpanic:/	{print $0}
 /ibwarn:/	{print $0}
 /iberror:/	{print $0}
diff --git a/infiniband-diags/scripts/ibclearcounters.in b/infiniband-diags/scripts/ibclearcounters.in
index 1818c42..0413d86 100644
--- a/infiniband-diags/scripts/ibclearcounters.in
+++ b/infiniband-diags/scripts/ibclearcounters.in
@@ -102,7 +102,7 @@ function clear_port_counters(lid, port)
 			}
 		}
 
-/^ib/	{print $0}
+/^ib/	{print $0; next}
 /ibpanic:/	{print $0}
 /ibwarn:/	{print $0}
 /iberror:/	{print $0}
diff --git a/infiniband-diags/scripts/ibclearerrors.in b/infiniband-diags/scripts/ibclearerrors.in
index c63283a..930efa6 100644
--- a/infiniband-diags/scripts/ibclearerrors.in
+++ b/infiniband-diags/scripts/ibclearerrors.in
@@ -95,7 +95,7 @@ function clear_errors(lid, port)
 			}
 		}
 
-/^ib/	{print $0}
+/^ib/	{print $0; next}
 /ibpanic:/	{print $0}
 /ibwarn:/	{print $0}
 /iberror:/	{print $0}
diff --git a/infiniband-diags/scripts/ibdatacounters.in b/infiniband-diags/scripts/ibdatacounters.in
index 902a865..7f0df1c 100644
--- a/infiniband-diags/scripts/ibdatacounters.in
+++ b/infiniband-diags/scripts/ibdatacounters.in
@@ -130,7 +130,7 @@ function check_node(lid)
 			}
 }
 
-/^ib/	{print $0}
+/^ib/	{print $0; next}
 /ibpanic:/	{print $0}
 /ibwarn:/	{print $0}
 /iberror:/	{print $0}
diff --git a/infiniband-diags/scripts/ibdatacounts.in b/infiniband-diags/scripts/ibdatacounts.in
index ccf9f34..4d8bfa1 100644
--- a/infiniband-diags/scripts/ibdatacounts.in
+++ b/infiniband-diags/scripts/ibdatacounts.in
@@ -132,7 +132,7 @@ function blue(s)
 
 /AllPortSelect/ {next}
 
-/^ib/	{print $0}
+/^ib/	{print $0; next}
 /ibpanic:/	{print $0}
 /ibwarn:/	{print $0}
 /iberror:/	{print $0}
diff --git a/infiniband-diags/scripts/ibhosts.in b/infiniband-diags/scripts/ibhosts.in
index a287edf..92b2dff 100644
--- a/infiniband-diags/scripts/ibhosts.in
+++ b/infiniband-diags/scripts/ibhosts.in
@@ -52,7 +52,7 @@ rv=$?
 echo "$text" | awk '
 /^Ca/	{print $1 "\t: 0x" substr($3, 4, 16) " ports " $2 " "\
 		substr($0, match($0, "#[ \t]*")+RLENGTH)} 
-/^ib/	{print $0}
+/^ib/	{print $0; next}
 /ibpanic:/	{print $0}
 /ibwarn:/	{print $0}
 /iberror:/	{print $0}
diff --git a/infiniband-diags/scripts/ibrouters.in b/infiniband-diags/scripts/ibrouters.in
index e053794..573ad0d 100644
--- a/infiniband-diags/scripts/ibrouters.in
+++ b/infiniband-diags/scripts/ibrouters.in
@@ -52,7 +52,7 @@ rv=$?
 echo "$text" | awk '
 /^Rt/	{print $1 "\t: 0x" substr($3, 4, 16) " ports " $2 " "\
 		substr($0, match($0, "#[ \t]*")+RLENGTH)} 
-/^ib/	{print $0}
+/^ib/	{print $0; next}
 /ibpanic:/	{print $0}
 /ibwarn:/	{print $0}
 /iberror:/	{print $0}
diff --git a/infiniband-diags/scripts/ibswitches.in b/infiniband-diags/scripts/ibswitches.in
index 0476d0e..59301f0 100644
--- a/infiniband-diags/scripts/ibswitches.in
+++ b/infiniband-diags/scripts/ibswitches.in
@@ -71,7 +71,7 @@ echo "$text" | awk '
 			else
 				print $1 "\t: 0x" substr($3, 4, 16) " ports " $2 " "\
 					desc " " type " " pinfo}
-/^ib/	{print $0}
+/^ib/	{print $0; next}
 /ibpanic:/	{print $0}
 /ibwarn:/	{print $0}
 /iberror:/	{print $0}




More information about the general mailing list