Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
orangepi-xunlong
GitHub Repository: orangepi-xunlong/orangepi-build
Path: blob/next/external/patch/misc/0007-bootsplash.patch
17846 views
1
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
2
index f4166263bb3a..a248429194bb 100644
3
--- a/drivers/tty/vt/keyboard.c
4
+++ b/drivers/tty/vt/keyboard.c
5
@@ -47,6 +47,8 @@
6
7
#include <asm/irq_regs.h>
8
9
+#include <linux/bootsplash.h>
10
+
11
extern void ctrl_alt_del(void);
12
13
/*
14
@@ -1353,6 +1355,28 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
15
}
16
#endif
17
18
+ /* Trap keys when bootsplash is shown */
19
+ if (bootsplash_would_render_now()) {
20
+ /* Deactivate bootsplash on ESC or Alt+Fxx VT switch */
21
+ if (keycode >= KEY_F1 && keycode <= KEY_F12) {
22
+ bootsplash_disable();
23
+
24
+ /*
25
+ * No return here since we want to actually
26
+ * perform the VT switch.
27
+ */
28
+ } else {
29
+ if (keycode == KEY_ESC)
30
+ bootsplash_disable();
31
+
32
+ /*
33
+ * Just drop any other keys.
34
+ * Their effect would be hidden by the splash.
35
+ */
36
+ return;
37
+ }
38
+ }
39
+
40
if (kbd->kbdmode == VC_MEDIUMRAW) {
41
/*
42
* This is extended medium raw mode, with keys above 127
43
44