diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2007-11-19 11:57:34 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2007-11-29 10:22:49 +0100 |
commit | 4da1393c0c2ed5054533f37adacc2f8c9fd7b62f (patch) | |
tree | edcff1df9d1831e1b54348acd57ccebd1d692f05 | |
parent | 66bdf91279122e5ef3de7f1b09f651d409e624a2 (diff) | |
download | barebox-4da1393c0c2ed5054533f37adacc2f8c9fd7b62f.tar.gz barebox-4da1393c0c2ed5054533f37adacc2f8c9fd7b62f.tar.xz |
[sandbox] added ^\q to exit uboot
This patch adds the possibility to exit u-boot in sandbox mode by
pressing ^\q.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r-- | drivers/serial/linux_console.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/serial/linux_console.c b/drivers/serial/linux_console.c index 3815b0778b..2faf8b55a5 100644 --- a/drivers/serial/linux_console.c +++ b/drivers/serial/linux_console.c @@ -48,10 +48,15 @@ static int linux_console_getc(struct console_device *cdev) { struct device_d *dev = cdev->dev; struct linux_console_data *d = dev->platform_data; + static char old_c; char c; linux_read(d->stdinfd, &c, 1); + if (old_c == 0x1c && c == 'q') + panic("^\\q pressed - exiting"); + + old_c = c; return c; } |