From 0fbf12645b1bd7795f8c03dfbf59060e2f0e1669 Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Wed, 13 Apr 2016 08:17:12 +1000 Subject: [PATCH] * lib/rsh.exp (rsh_exec): Handle regexp return status. Signed-off-by: Ben Elliston --- ChangeLog | 4 ++++ lib/rsh.exp | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f0e09ee..2e8070a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2016-04-13 Christophe Lyon + + * lib/rsh.exp (rsh_exec): Handle regexp return status. + 2016-04-08 Ben Elliston Reported by Faraz Shahbazker. diff --git a/lib/rsh.exp b/lib/rsh.exp index 0e3eb07..6446db2 100644 --- a/lib/rsh.exp +++ b/lib/rsh.exp @@ -276,7 +276,9 @@ proc rsh_exec { boardname program pargs inp outp } { regsub "XYZ(\[0-9\]*)ZYX\n?" $output "" output return [list $status "$RSH to $boardname failed for $program, $output"] } - regexp "XYZ(\[0-9\]*)ZYX" $output junk status + if { [regexp "XYZ(\[0-9\]*)ZYX" $output junk status] == 0 } { + set status "" + } verbose "rsh_exec: status:$status text:$output" 4 if { $status == "" } { return [list -1 "Couldn't parse $RSH output, $output."] -- 2.7.4