From patchwork Wed Oct 25 12:45:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: 'Max Staudt X-Patchwork-Id: 10026649 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 21F51601E8 for ; Wed, 25 Oct 2017 12:48:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FAC028B61 for ; Wed, 25 Oct 2017 12:48:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D6BE28B74; Wed, 25 Oct 2017 12:48:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C028228B61 for ; Wed, 25 Oct 2017 12:48:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752110AbdJYMr7 (ORCPT ); Wed, 25 Oct 2017 08:47:59 -0400 Received: from mx2.suse.de ([195.135.220.15]:36163 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751833AbdJYMqb (ORCPT ); Wed, 25 Oct 2017 08:46:31 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 69C02AD49; Wed, 25 Oct 2017 12:46:28 +0000 (UTC) From: Max Staudt To: b.zolnierkie@samsung.com, linux-fbdev@vger.kernel.org Cc: mstaudt@suse.de, tiwai@suse.com, oneukum@suse.com, msrb@suse.com, sndirsch@suse.com, michal@markovi.net, linux-kernel@vger.kernel.org Subject: [RFC 07/14] bootsplash: Add VT keyboard hook Date: Wed, 25 Oct 2017 14:45:55 +0200 Message-Id: <20171025124602.28292-8-mstaudt@suse.de> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20171025124602.28292-1-mstaudt@suse.de> References: <20171025124602.28292-1-mstaudt@suse.de> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Let's disable the splash if the user presses ESC or F1-F12 on a VT. The F1-F12 check is to disable the splash on VT switches. Signed-off-by: Max Staudt Reviewed-by: Oliver Neukum --- drivers/tty/vt/keyboard.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index f4166263bb3a..177b35182b7c 100644 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c @@ -47,6 +47,8 @@ #include +#include + extern void ctrl_alt_del(void); /* @@ -1353,6 +1355,15 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw) } #endif + /* Deactivate bootsplash on ESC or Alt+Fxx VT switch */ + if (((keycode >= KEY_F1 && keycode <= KEY_F12) || keycode == KEY_ESC) + && bootsplash_is_enabled()) { + bootsplash_disable(); + + if (keycode == KEY_ESC) + return; + } + if (kbd->kbdmode == VC_MEDIUMRAW) { /* * This is extended medium raw mode, with keys above 127