diff mbox

[U-Boot,v2,2/4] sandbox: Disable Ctrl-C

Message ID 1410720017-22217-2-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass Sept. 14, 2014, 6:40 p.m. UTC
This is not supported properly on sandbox, and interferes with running
tests, since when a test script is piped in, some commands will call
ctrlc() which will drop characters from the test script.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Remove more elaborate feature and just disable ctrlc for sandbox

 common/console.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Tom Rini Sept. 25, 2014, 2:44 p.m. UTC | #1
On Sun, Sep 14, 2014 at 12:40:15PM -0600, Simon Glass wrote:

> This is not supported properly on sandbox, and interferes with running
> tests, since when a test script is piped in, some commands will call
> ctrlc() which will drop characters from the test script.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/common/console.c b/common/console.c
index 898da39..5a2f411 100644
--- a/common/console.c
+++ b/common/console.c
@@ -524,6 +524,7 @@  static int ctrlc_disabled = 0;	/* see disable_ctrl() */
 static int ctrlc_was_pressed = 0;
 int ctrlc(void)
 {
+#ifndef CONFIG_SANDBOX
 	if (!ctrlc_disabled && gd->have_console) {
 		if (tstc()) {
 			switch (getc()) {
@@ -535,6 +536,8 @@  int ctrlc(void)
 			}
 		}
 	}
+#endif
+
 	return 0;
 }
 /* Reads user's confirmation.