aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.exp
diff options
context:
space:
mode:
authorBen Elliston <bje@gnu.org>2006-05-22 06:01:35 +0000
committerBen Elliston <bje@gnu.org>2006-05-22 06:01:35 +0000
commit433e1aeb52247acb6ebed9b7ecba5077eb7a7083 (patch)
tree2123f2f4d06c24ac0e24fb9a5587363c76bfa6a5 /lib/ftp.exp
parentb6feeb81729c431a93264a920e3d4ac93f6b96f5 (diff)
downloaddejagnu-433e1aeb52247acb6ebed9b7ecba5077eb7a7083.zip
dejagnu-433e1aeb52247acb6ebed9b7ecba5077eb7a7083.tar.gz
dejagnu-433e1aeb52247acb6ebed9b7ecba5077eb7a7083.tar.bz2
* runtest.exp, baseboards/basic-sim.exp, baseboards/cf.exp,
baseboards/cris-sim.exp, baseboards/i960-cyclone.exp, baseboards/mcore-moto-sim.exp, baseboards/mips64vr4100-sim.exp, baseboards/mmixware-sim.exp, baseboards/op50n.exp, baseboards/rom68k-idp.exp, baseboards/sparclite-sim-le.exp, baseboards/usparc-cygmon.exp, config/base-config.exp, config/base68k.exp, config/ddb-ether.exp, config/ddb.exp, config/dos.exp, config/gdb-comm.exp, config/gdb_stub.exp, config/i386-bozo.exp, config/i960.exp, config/m68k-emc.exp, config/netware.exp, config/sid.exp, config/sim.exp, config/tic80.exp, config/unix.exp, config/vxworks.exp, lib/debugger.exp, lib/dejagnu.exp, lib/dg.exp, lib/framework.exp, lib/ftp.exp, lib/kermit.exp, lib/libgloss.exp, lib/remote.exp, lib/rlogin.exp, lib/rsh.exp, lib/target.exp, lib/targetdb.exp, lib/telnet.exp, lib/tip.exp, lib/utils.exp: Put braces around if expressions throughout.
Diffstat (limited to 'lib/ftp.exp')
-rw-r--r--lib/ftp.exp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/ftp.exp b/lib/ftp.exp
index 0061145..a9510bb 100644
--- a/lib/ftp.exp
+++ b/lib/ftp.exp
@@ -23,15 +23,15 @@ proc ftp_open {host} {
set prompt "ftp>"
global board_info
- if [board_info $host exists name] {
+ if {[board_info $host exists name]} {
set host [board_info $host name]
}
- if [board_info $host exists ftp_fileid] {
+ if {[board_info $host exists ftp_fileid]} {
return [board_info $host ftp_fileid]
}
- if [board_info $host exists hostname] {
+ if {[board_info $host exists hostname]} {
set remotehost [board_info $host hostname]
} else {
set remotehost $host
@@ -62,8 +62,8 @@ proc ftp_open {host} {
return -1
}
set board_info($host,ftp_fileid) $spawn_id
- if [board_info $host exists ftp_username] {
- if [board_info $host exists ftp_password] {
+ if {[board_info $host exists ftp_username]} {
+ if {[board_info $host exists ftp_password]} {
set command "user [board_info $host ftp_username] [board_info $host ftp_password]\n"
} else {
set command "user [board_info $host ftp_username]\n"
@@ -88,7 +88,7 @@ proc ftp_open {host} {
return -1
}
}
- if [board_info $host exists ftp_directory] {
+ if {[board_info $host exists ftp_directory]} {
send "cd [board_info $host ftp_directory]\n"
expect {
-i $spawn_id -re "250.*$prompt" { }
@@ -100,7 +100,7 @@ proc ftp_open {host} {
}
}
- if [board_info $host exists ftp_no_passive] {
+ if {[board_info $host exists ftp_no_passive]} {
send "passive\n"
expect {
-i $spawn_id -re "Passive mode off.*$prompt" { }
@@ -165,7 +165,7 @@ proc ftp_download {host localfile remotefile} {
verbose "putting $localfile $remotefile"
- if [board_info $host exists hostname] {
+ if {[board_info $host exists hostname]} {
set remotehost [board_info $host hostname]
} else {
set remotehost $host
@@ -220,11 +220,11 @@ proc ftp_download {host localfile remotefile} {
proc ftp_close {host} {
global board_info
- if [board_info $host exists name] {
+ if {[board_info $host exists name]} {
set host [board_info $host name]
}
- if ![board_info $host exists ftp_fileid] {
+ if {![board_info $host exists ftp_fileid]} {
return ""
}