diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/adb.exp | 8 | ||||
-rw-r--r-- | config/gdb-comm.exp | 12 | ||||
-rw-r--r-- | config/gdb_stub.exp | 4 | ||||
-rw-r--r-- | config/sim.exp | 4 | ||||
-rw-r--r-- | config/unix.exp | 4 | ||||
-rw-r--r-- | config/vxworks.exp | 16 |
6 files changed, 24 insertions, 24 deletions
diff --git a/config/adb.exp b/config/adb.exp index ee4ef2d..87d3d1a 100644 --- a/config/adb.exp +++ b/config/adb.exp @@ -23,7 +23,7 @@ proc adb_serial {} { # If the user has ADB_SERIAL set, use that, otherwise default to the # only device. set serial "[getenv ADB_SERIAL]" - if { $serial == "" } { + if { $serial eq "" } { set status [catch "exec adb devices |& wc -l" output] if { $output > 3 } { perror "Set ADB_SERIAL in your environment to specify the correct target device!" @@ -54,7 +54,7 @@ proc adb_open { hostname } { } set serial [adb_serial] - if { $serial != "" } { + if { $serial ne "" } { spawn adb [adb_serial] shell } else { spawn adb shell @@ -159,7 +159,7 @@ proc adb_exec { boardname cmd args } { # If CMD sends any output to stderr, exec will think it failed. More often # than not that will be true, but it doesn't catch the case where there is # no output but the exit code is non-zero. - if { $inp == "" } { + if { $inp eq "" } { set inp "/dev/null" } @@ -178,7 +178,7 @@ proc adb_exec { boardname cmd args } { regexp "XYZ(\[0-9\]*)ZYX" $output junk status verbose "adb_exec: status:$status text:$output" 4 - if { $status == "" } { + if { $status eq "" } { return [list -1 "Couldn't parse adb output, $output."] } regsub "XYZ(\[0-9\]*)ZYX\n?" $output "" output diff --git a/config/gdb-comm.exp b/config/gdb-comm.exp index 07ba25e..141e4ee 100644 --- a/config/gdb-comm.exp +++ b/config/gdb-comm.exp @@ -165,7 +165,7 @@ proc gdb_comm_start { dest } { # provided with one. if {![info exists GDB]} then { set GDB "[lookfor_file ${tool_root_dir} gdb/gdb]" - if { $GDB == "" } { + if { $GDB eq "" } { set GDB [transform gdb] } } @@ -218,7 +218,7 @@ proc quit_gdb { } { set spawn_id [board_info host fileid] - if { $spawn_id != "" && $spawn_id > -1 } { + if { $spawn_id ne "" && $spawn_id > -1 } { if { [remote_send host "quit\n"] eq "" } { remote_expect host 10 { -re ".*y or n.*$" { @@ -257,7 +257,7 @@ proc gdb_comm_load { dest prog args } { set argnames { "command-line arguments" "input file" "output file" } for { set x 0 } { $x < [llength $args] } { incr x } { - if { [lindex $args $x] != "" } { + if { [lindex $args $x] ne "" } { return [list "unsupported" "no support for [lindex $argnames $x] on this target"] } } @@ -399,7 +399,7 @@ proc gdb_comm_load { dest prog args } { # work would be necessary for things like the g++ testsuite which # use printf to indicate pass/fail status. - if { [gdb_comm_add_breakpoint _exit] != "" } { + if { [gdb_comm_add_breakpoint _exit] ne "" } { gdb_comm_add_breakpoint exit } gdb_comm_add_breakpoint abort @@ -528,7 +528,7 @@ proc gdb_comm_reload { dest prog aargs } { # how many times have we done this? set n_reloads [board_info $dest n_reloads] - if {$n_reloads == ""} { + if {$n_reloads eq ""} { set n_reloads 0 } @@ -539,7 +539,7 @@ proc gdb_comm_reload { dest prog aargs } { # how many times are we allowed to do this? set max [board_info $dest max_reload_reboots] - if {$max == ""} { + if {$max eq ""} { set max 15 } diff --git a/config/gdb_stub.exp b/config/gdb_stub.exp index 7d8cb0d..b86c8e5 100644 --- a/config/gdb_stub.exp +++ b/config/gdb_stub.exp @@ -29,7 +29,7 @@ proc gdb_stub_init { dest args } { if {![info exists GDB]} then { set GDB "[lookfor_file ${tool_root_dir} gdb/gdb]" - if { $GDB == "" } { + if { $GDB eq "" } { set GDB [transform gdb] } } @@ -475,7 +475,7 @@ proc gdb_stub_load { dest prog args } { set argnames { "command-line arguments" "input file" "output file" } for { set x 0 } { $x < [llength $args] } { incr x } { - if { [lindex $args $x] != "" } { + if { [lindex $args $x] ne "" } { return [list "unsupported" "no support for [lindex $argnames $x] on this target"] } } diff --git a/config/sim.exp b/config/sim.exp index b507742..8d9088c 100644 --- a/config/sim.exp +++ b/config/sim.exp @@ -62,7 +62,7 @@ proc sim_wait { dest timeout } { proc sim_load { dest prog args } { set inpfile "" if { [llength $args] > 1 } { - if { [lindex $args 1] != "" } { + if { [lindex $args 1] ne "" } { set inpfile "[lindex $args 1]" } } @@ -92,7 +92,7 @@ proc sim_load { dest prog args } { # Run the program with a limited amount of real time. While # this isn't as nice as limiting the amount of CPU time, it # will have to do. - if { $inpfile != "" } { + if { $inpfile ne "" } { set res [remote_spawn target "${cmd} < $inpfile" "readonly"] } else { set res [remote_spawn target "${cmd}"] diff --git a/config/unix.exp b/config/unix.exp index 893d514..0b8e124 100644 --- a/config/unix.exp +++ b/config/unix.exp @@ -62,7 +62,7 @@ proc unix_load { dest prog args } { } verbose "loading to $dest" 2 if {![isremote $dest]} { - if { "$inp" != "" } { + if { "$inp" ne "" } { set command "$prog $parg < $inp" } else { set command "$prog $parg" @@ -98,7 +98,7 @@ proc unix_load { dest prog args } { } else { set remotefile [file tail $prog] set remotefile [remote_download $dest $prog $remotefile] - if { $remotefile == "" } { + if { $remotefile eq "" } { verbose -log "Download of $prog to [board_info $dest name] failed." 3 return [list "unresolved" ""] } diff --git a/config/vxworks.exp b/config/vxworks.exp index 21f6c41..86ac884 100644 --- a/config/vxworks.exp +++ b/config/vxworks.exp @@ -30,7 +30,7 @@ proc ${board}_init { dest } { set desired_kernel [board_info $dest "kernel,$target_os"] - if { $desired_kernel == "" } { + if { $desired_kernel eq "" } { vxworks_final_init $dest # Nothing to see here, nothing to do. Move along. return @@ -112,7 +112,7 @@ proc ${board}_init { dest } { proc vxworks_final_init { dest } { if {[board_info $dest exists preload_obj]} { - if { [target_compile [board_info $dest preload_obj] foo.out object [board_info $dest preload_obj_flags]] == "" } { + if { [target_compile [board_info $dest preload_obj] foo.out object [board_info $dest preload_obj_flags]] eq "" } { vxworks_ld $dest foo.out } remote_file build delete foo.out @@ -130,7 +130,7 @@ proc vxworks_exec { dest program pargs inp outp } { return [list -1 "open failure"] } - if { $inp != "" } { + if { $inp ne "" } { set inp [remote_download $dest $inp] set suffix " < $inp" } else { @@ -159,7 +159,7 @@ proc vxworks_exec { dest program pargs inp outp } { set result [list -1 "unable to execute command"] } } - if { $suffix != "" } { + if { $suffix ne "" } { remote_file $dest delete $inp } return $result @@ -213,7 +213,7 @@ proc vxworks_open { dest args } { set shell_id [remote_raw_open $dest] - if { $shell_id == "" || $shell_id < 0 } { + if { $shell_id eq "" || $shell_id < 0 } { return -1 } @@ -243,7 +243,7 @@ proc vxworks_open { dest args } { if {[board_info $dest exists vxworks_homedir]} { set dir [board_info $dest vxworks_homedir] } - if { $dir != "" } { + if { $dir ne "" } { set status [remote_exec $dest "cd" "\"$dir\""] if {[lindex $status 0]} { perror "Error in cd to $dir--[lindex $status 1]" @@ -264,7 +264,7 @@ proc vxworks_ld { dest prog } { global decimal hex global board_info - if { $prog == "" } { + if { $prog eq "" } { return 1 } @@ -479,7 +479,7 @@ proc vxworks_load {dest prog args} { } } } - if { $result != "" } { + if { $result ne "" } { vxworks_unld $dest return [list $result $output] } |