From 4da1393c0c2ed5054533f37adacc2f8c9fd7b62f Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde Date: Mon, 19 Nov 2007 11:57:34 +0100 Subject: [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 --- drivers/serial/linux_console.c | 5 +++++ 1 file changed, 5 insertions(+) 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; } -- cgit v1.2.3