summaryrefslogtreecommitdiff
blob: ff4e970a4fd46d43046207d6072b98c169c520ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
fix from upstream:

2004-03-05  Daniel Jacobowitz  <drow@mvista.com>
                                                                                
	* lib/remote.exp (standard_spawn): Fix rsh username support.

diff --git a/lib/remote.exp b/lib/remote.exp
index b57276e..cdec0d2 100644
--- a/lib/remote.exp
+++ b/lib/remote.exp
@@ -860,19 +860,18 @@ proc standard_spawn { dest commandline } {
         set RSH [board_info $dest rsh_prog]
     }
 
-    if ![board_info $dest exists username] {
-        set rsh_useropts ""
-    } else {
-        set rsh_useropts "-l $username"
-    }
-
     if [board_info $dest exists hostname] {
 	set remote [board_info $dest hostname]
     } else {
 	set remote $dest
     }
 
-    spawn $RSH $rsh_useropts $remote $commandline
+    if ![board_info $dest exists username] {
+        spawn $RSH $remote $commandline
+    } else {
+        spawn $RSH -l [board_info $dest username] $remote $commandline
+    }
+
     set board_info($dest,fileid) $spawn_id
     return $spawn_id
 }
@@ -1257,6 +1256,8 @@ proc remote_expect { board timeout args } {
     }
 
     if {$code == 1} {
+        if {[info exists string]} {send_user "ERROR OCCURED: $errorInfo $errorCode $string"}
+
 	if { $error_sect != "" } {
 	    set code [catch {uplevel $error_sect} string]
 	} else {