[coreboot-gerrit] Change in coreboot[master]: tint: make it possible to reboot by pressing 'q' key two times
Mike Banon (Code Review)
gerrit at coreboot.org
Fri Feb 23 18:18:25 CET 2018
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 at 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
--
To view, visit https://review.coreboot.org/23853
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia56d639fa8e563047fb3d2723695626a449ead40
Gerrit-Change-Number: 23853
Gerrit-PatchSet: 1
Gerrit-Owner: Mike Banon <mikebdp2 at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180223/c654bcb3/attachment-0001.html>
More information about the coreboot-gerrit
mailing list