mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-28 08:35:38 +00:00
sandbox: Disable Ctrl-C
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>
This commit is contained in:
parent
b845052103
commit
8969ea3e9f
1 changed files with 3 additions and 0 deletions
|
@ -524,6 +524,7 @@ static int ctrlc_disabled = 0; /* see disable_ctrl() */
|
||||||
static int ctrlc_was_pressed = 0;
|
static int ctrlc_was_pressed = 0;
|
||||||
int ctrlc(void)
|
int ctrlc(void)
|
||||||
{
|
{
|
||||||
|
#ifndef CONFIG_SANDBOX
|
||||||
if (!ctrlc_disabled && gd->have_console) {
|
if (!ctrlc_disabled && gd->have_console) {
|
||||||
if (tstc()) {
|
if (tstc()) {
|
||||||
switch (getc()) {
|
switch (getc()) {
|
||||||
|
@ -535,6 +536,8 @@ int ctrlc(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* Reads user's confirmation.
|
/* Reads user's confirmation.
|
||||||
|
|
Loading…
Add table
Reference in a new issue