[ofa-general] [PATCH] infiniband-diags/dump_lfts.sh: adopt DR Path parser
Sasha Khapyorsky
sashak at voltaire.com
Thu Jan 3 00:23:55 PST 2008
Adopt DR Path parser to the new ibnetdiscover format, where DR Path is
shown as comma separated list.
Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
infiniband-diags/scripts/dump_lfts.sh | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/infiniband-diags/scripts/dump_lfts.sh b/infiniband-diags/scripts/dump_lfts.sh
index 67a307c..81984af 100755
--- a/infiniband-diags/scripts/dump_lfts.sh
+++ b/infiniband-diags/scripts/dump_lfts.sh
@@ -23,9 +23,8 @@ done
dump_by_dr_path ()
{
for sw_dr in `ibnetdiscover $ca_info -v \
- | sed -ne '/^DR path .* switch /s/^DR path \[\(.*\)\].*$/\1/p' \
- | sed -e 's/\]\[/,/g' \
- | sort -u` ; do
+ | sed -ne '/^DR path .* switch /s/^DR path \([,|0-9]\+\) ->.*$/\1/p' \
+ | sort -u` ; do
ibroute $ca_info -D ${sw_dr}
done
}
--
1.5.3.4.206.g58ba4
More information about the general
mailing list