]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/serial/sandbox.c
sandbox: Allow Ctrl-C to work in sandbox
[karo-tx-uboot.git] / drivers / serial / sandbox.c
index c27b5b8fe52b4420e2b5b6160d193a758eff8653..51fd871dff9b3fbfd939ac4cd6d54c88bb01502f 100644 (file)
@@ -15,6 +15,7 @@
 #include <os.h>
 #include <serial.h>
 #include <linux/compiler.h>
+#include <asm/state.h>
 
 /*
  *
@@ -31,7 +32,10 @@ static unsigned int serial_buf_read;
 
 static int sandbox_serial_init(void)
 {
-       os_tty_raw(0);
+       struct sandbox_state *state = state_get_current();
+
+       if (state->term_raw != STATE_TERM_COOKED)
+               os_tty_raw(0, state->term_raw == STATE_TERM_RAW_WITH_SIGS);
        return 0;
 }