Mike Banon has uploaded this change for review. ( https://review.coreboot.org/23853
Change subject: tint: make it possible to reboot by pressing 'q' key two times ......................................................................
tint: make it possible to reboot by pressing 'q' key two times
Earlier it was impossible to exit without pressing the power button
Change-Id: Ia56d639fa8e563047fb3d2723695626a449ead40 Signed-off-by: Mike Banon mikebdp2@gmail.com --- M payloads/external/tint/libpayload_tint.patch 1 file changed, 14 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/53/23853/1
diff --git a/payloads/external/tint/libpayload_tint.patch b/payloads/external/tint/libpayload_tint.patch index b743b2f..a21eabf 100644 --- a/payloads/external/tint/libpayload_tint.patch +++ b/payloads/external/tint/libpayload_tint.patch @@ -376,7 +376,7 @@ rand_init (); /* must be called before engine_init () */ engine_init (&engine,score_function); /* must be called before using engine.curshape */ finished = shownext = FALSE; -@@ -673,11 +692,20 @@ int main (int argc,char *argv[]) +@@ -673,11 +692,31 @@ int main (int argc,char *argv[]) /* Restore console settings and exit */ io_close (); +#if 0 @@ -389,9 +389,20 @@ savescores (GETSCORE (engine.score)); } +#endif -+ printf("Bye.\n"); ++ printf("Press 'q' to reboot...\n"); + refresh(); -+ for(;;); //halt(); ++ for (;;) { ++ in_flush (); ++ while ((ch = in_getch ()) == ERR) ; /* Wait for a key to be pressed */ ++ if (ch == 'q') { /* reboot */ ++ outb(0x6, 0xcf9); ++ for(;;); //halt(); ++ } ++ else { ++ in_flush (); ++ } ++ } ++ +#if 0 exit (EXIT_SUCCESS); +#endif