aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Elliston <bje@gnu.org>2016-04-15 08:57:10 +1000
committerBen Elliston <bje@gnu.org>2016-04-15 08:57:10 +1000
commit8cda35c115404073d824594084af807e8412b3a1 (patch)
tree9a1334bac9baf9b3008e83dbf60a47934b2c53ed /lib
parentda57e729a161d0df6ae74bae160622b89bcbd23e (diff)
* lib/ssh.exp (ssh_exec): Handle regexp return status.
Diffstat (limited to 'lib')
-rw-r--r--lib/ssh.exp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ssh.exp b/lib/ssh.exp
index 8273af4..5487589 100644
--- a/lib/ssh.exp
+++ b/lib/ssh.exp
@@ -186,7 +186,9 @@ proc ssh_exec { boardname program pargs inp outp } {
regsub "XYZ(\[0-9\]*)ZYX\n?" $output "" output
return [list $status "$SSH 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 "ssh_exec: status:$status text:$output" 4
if { $status == "" } {
return [list -1 "Couldn't parse $SSH output, $output."]