sandbox: Disable Ctrl-C
authorSimon Glass <sjg@chromium.org>
Sun, 14 Sep 2014 18:40:15 +0000 (12:40 -0600)
committerTom Rini <trini@ti.com>
Wed, 24 Sep 2014 22:30:28 +0000 (18:30 -0400)
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>
common/console.c

index 898da3935ef21c101b674174f80fb21c622942d0..5a2f411600280acd5ba435762083f8394da61377 100644 (file)
@@ -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.