diff options
Diffstat (limited to 'lib/mondfe.exp')
-rw-r--r-- | lib/mondfe.exp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/lib/mondfe.exp b/lib/mondfe.exp index add4597..82486fe 100644 --- a/lib/mondfe.exp +++ b/lib/mondfe.exp @@ -35,24 +35,24 @@ proc mondfe_open { hostname } { set shell_prompt [board_info $hostname shell_prompt] if ![board_info $hostname exists mondfe,name] { perror "Must set board_info(${hostname},mondfe,name)" - return -1; + return -1 } if [board_info $hostname exists mondfe] { - set mondfe [board_info $hostname mondfe]; + set mondfe [board_info $hostname mondfe] } else { set mondfe "mondfe" } - set remote_host [board_info $hostname mondfe,name]; + set remote_host [board_info $hostname mondfe,name] if [board_info $hostname exists mondfe_host] { - set rh [board_info $hostname mondfe_host]; + set rh [board_info $hostname mondfe_host] } else { verbose "Attempting to connect to $hostname via mondfe." - set rh "host"; + set rh "host" } - set shell_id [remote_spawn $rh "$mondfe -D -TIP $remote_host"]; + set shell_id [remote_spawn $rh "$mondfe -D -TIP $remote_host"] remote_expect $rh 60 { "$shell_prompt" { @@ -63,16 +63,16 @@ proc mondfe_open { hostname } { warning "Socket file already exists." incr retries if { $retries <= 2 } { - exp_continue; + exp_continue } } -indices -re ".*(UDIERROR\[^\r\n\]*)\[\r\n\]" { warning "$expect_out(1,string)" - exp_continue; + exp_continue } -indices -re ".*(DFEERROR\[^\r\n\]*)\[\r\n\]" { warning "$expect_out(1,string)" - exp_continue; + exp_continue } timeout { warning "Timed out trying to connect." @@ -80,18 +80,18 @@ proc mondfe_open { hostname } { incr retries if { $retries <= 2 } { remote_send $rh "\n" - exp_continue; + exp_continue } } } if { $result < 0 } { perror "Couldn't connect after $retries retries." - remote_close $rh; + remote_close $rh return -1 } else { - set board_info($hostname,fileid) $shell_id; - return $shell_id; + set board_info($hostname,fileid) $shell_id + return $shell_id } } @@ -112,10 +112,10 @@ proc mondfe_ld { dest_machine file } { set shell_prompt [board_info $dest_machine shell_prompt] if [board_info $dest_machine exists mondfe_host] { - set remote_host [board_info $dest_machine mondfe_host]; + set remote_host [board_info $dest_machine mondfe_host] set file [remote_download $remote_host $file montest] } else { - set remote_host "host"; + set remote_host "host" } verbose "Downloading $file." 2 @@ -124,26 +124,26 @@ proc mondfe_ld { dest_machine file } { remote_send $remote_host "y $file\n" remote_expect $remote_host 60 { "y $file" { - exp_continue; + exp_continue } -re "loading $file\[\r\n\]+" { - exp_continue; + exp_continue } -re "Load(ing|ed) *TEXT section from\[^\r\n\]*\[\r\n\]+" { verbose -n "." 2 - exp_continue; + exp_continue } -re "Load(ing|ed) *LIT section from\[^\r\n\]*\[\r\n\]+" { verbose -n "." 2 - exp_continue; + exp_continue } -re "Load(ing|ed) *DATA section from\[^\r\n\]*\[\r\n\]+" { verbose -n "." 2 - exp_continue; + exp_continue } -re "Clear(ing|ed) *BSS section from\[^\r\n\]*\[\r\n\]+" { verbose -n "." 2 - exp_continue; + exp_continue } -re "(^|\[\r\n\]+)$shell_prompt$" { verbose "Downloaded $file successfully." 2 @@ -158,7 +158,7 @@ proc mondfe_ld { dest_machine file } { } -re "Ignoring COMMENT section \($decimal bytes\)\[^\r\n\]*\[\r\n\]+" { verbose "Ignoring COMMENT section" 2 - exp_continue; + exp_continue } timeout { perror "Timed out trying to download $file." @@ -184,13 +184,13 @@ proc mondfe_close { hostname } { global board_info if [board_info $hostname exists mondfe_host] { - set remote_host [board_info $hostname mondfe_host]; + set remote_host [board_info $hostname mondfe_host] } else { - set remote_host "host"; + set remote_host "host" } if ![board_info $hostname exists fileid] { - return 0; + return 0 } if [board_info $remote_host exists fileid] { @@ -204,10 +204,10 @@ proc mondfe_close { hostname } { } } - remote_close $remote_host; + remote_close $remote_host } - unset board_info($hostname,fileid); + unset board_info($hostname,fileid) - return 0; + return 0 } |