From 5b7c2bdd028d4cebebed6c1d61e32443adc4ab9a Mon Sep 17 00:00:00 2001
From: Anton Kolesov <anton.kolesov@synopsys.com>
Date: Sun, 27 Oct 2013 19:45:39 +0400
Subject: [PATCH 1/1] Change standard_reboot return value

Procedure standard_reboot should return 1 instead of an empty string to
comply with ${board}_reboot defined in config/base-config.exp and common
practice.

Add a comment to remote_reboot explaining its return value.
---
 ChangeLog      |  5 +++++
 lib/remote.exp | 11 +++++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a8ab512..0895e08 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-27  Anton Kolesov  <anton.kolesov@synopsys.com>
+
+	* lib/remote.exp (standard_reboot): Return 1 instead of an empty string.
+	(remote_reboot): Add comment explaining return value of this procedure.
+
 2013-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
 
 	* baseboards/unix.exp: Add gdb settings to not use hardware
diff --git a/lib/remote.exp b/lib/remote.exp
index 5cfe43a..c8ba792 100644
--- a/lib/remote.exp
+++ b/lib/remote.exp
@@ -344,7 +344,10 @@ proc remote_raw_binary { host } {
 }
 
 
-
+# Return value of this function depends on actual implementation of reboot that
+# will be used, in practice it is expected that remote_reboot returns 1 on
+# success and 0 on failure.
+#
 proc remote_reboot { host } {
     clone_output "\nRebooting ${host}\n"
     # FIXME: don't close the host connection, or all the remote
@@ -360,8 +363,12 @@ proc remote_reboot { host } {
     return $status
 }
 
+# It looks like that this proc is never called, instead ${board}_reboot defined
+# in base-config.exp will be used because it has higher priority and
+# base-config is always imported from runtest.exp.
+#
 proc standard_reboot { host } {
-    return ""
+    return 1
 }
 #
 # Download file FILE to DEST. If the optional DESTFILE is specified,
-- 
1.8.4.1

