/[dejagnu]/dejagnu/lib/xsh.exp
ViewVC logotype

Diff of /dejagnu/lib/xsh.exp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by rsavoye, Mon Mar 17 02:25:07 2003 UTC revision 1.5 by bje, Thu Aug 7 03:42:43 2003 UTC
# Line 29  proc xsh_open { hostname } { Line 29  proc xsh_open { hostname } {
29      global board_info      global board_info
30    
31      if [board_info $hostname exists fileid] {      if [board_info $hostname exists fileid] {
32          unset board_info($hostname,fileid);          unset board_info($hostname,fileid)
33      }      }
34    
35      if ![board_info $hostname exists spectra] {      if ![board_info $hostname exists spectra] {
36          perror "No spectra directory for $hostname";          perror "No spectra directory for $hostname"
37          return -1;          return -1
38      } else {      } else {
39          set spectra [board_info $hostname spectra];          set spectra [board_info $hostname spectra]
40      }      }
41    
42      if ![board_info $hostname exists xsh_shell_prompt] {      if ![board_info $hostname exists xsh_shell_prompt] {
43          set xsh_shell_prompt ".*> "          set xsh_shell_prompt ".*> "
44      } else {      } else {
45          set xsh_shell_prompt [board_info $hostname shell_prompt];          set xsh_shell_prompt [board_info $hostname shell_prompt]
46      }      }
47    
48      set retries 0      set retries 0
49      set result  0      set result  0
50      if ![board_info $hostname exists xsh_prog] {      if ![board_info $hostname exists xsh_prog] {
51          set xsh xsh;          set xsh xsh
52      } else {      } else {
53          set xsh [board_info $hostname xsh_prog];          set xsh [board_info $hostname xsh_prog]
54      }      }
55    
56      if {[which $xsh] != 0} {      if {[which $xsh] != 0} {
# Line 121  proc xsh_open { hostname } { Line 121  proc xsh_open { hostname } {
121          }          }
122      }      }
123    
124      set board_info($hostname,fileid) $spawn_id;      set board_info($hostname,fileid) $spawn_id
125      # load to operating system      # load to operating system
126      set timeout 20      set timeout 20
127      set retries 0      set retries 0
# Line 164  proc xsh_open { hostname } { Line 164  proc xsh_open { hostname } {
164          perror "Couldn't connect after $retries retries.\n"          perror "Couldn't connect after $retries retries.\n"
165          return -1          return -1
166      } else {      } else {
167          set board_info($hostname,fileid) $spawn_id;          set board_info($hostname,fileid) $spawn_id
168          return $spawn_id          return $spawn_id
169      }      }
170  }  }
# Line 187  proc xsh_download { dest file destfile a Line 187  proc xsh_download { dest file destfile a
187    
188      set result 1      set result 1
189      set retries 0      set retries 0
190      set shell_id [board_info $dest fileid];      set shell_id [board_info $dest fileid]
191    
192      if { [llength $args] > 1 } {      if { [llength $args] > 1 } {
193          set opts [lindex $args 1]          set opts [lindex $args 1]
# Line 310  proc xsh_close { hostname } { Line 310  proc xsh_close { hostname } {
310      global board_info      global board_info
311    
312      if ![board_info $hostname exists fileid] {      if ![board_info $hostname exists fileid] {
313          return;          return
314      }      }
315    
316      set shell_id [board_info ${hostname} fileid];      set shell_id [board_info ${hostname} fileid]
317      send -i $shell_id "exit\n"      send -i $shell_id "exit\n"
318      unset board_info(${hostname},fileid);      unset board_info(${hostname},fileid)
319    
320      verbose "Exiting shell."      verbose "Exiting shell."
321      return 0      return 0

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26