From patchwork Thu Feb 2 09:24:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 649654 Delivered-To: patch@linaro.org Received: by 2002:a17:522:d8c:b0:4be:c3dc:14d8 with SMTP id d12csp135393pva; Thu, 2 Feb 2023 01:25:42 -0800 (PST) X-Google-Smtp-Source: AK7set9ZfiJEZSxA2kxFjGlKukRIiE5gMn+Yjqc9eftA3CB4zcUk8U4VftvJkC5NQX2jGRVQxVEB X-Received: by 2002:a05:6871:b0a:b0:15e:e77b:b2da with SMTP id fq10-20020a0568710b0a00b0015ee77bb2damr2733317oab.17.1675329942706; Thu, 02 Feb 2023 01:25:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675329942; cv=none; d=google.com; s=arc-20160816; b=BMioGMXG6B5SQ5JkmslMSb5pZE1LpuQFjekvVXdc0jIV8IEN8nioDU5xKnVFLlwtyU SdMXquayMQfMty/WaOxpEo1IFh9cGgwzOH8pj1Ty4MbLn9zDORmTdWiwbKFMhZ6ONWFg r058pB34EwDfFvNUm5mP8SHPN3Pyc8cZomN4pR7OArGxvQuIJLavuA48tXDe99mJzwEp wLH4yJsxk4/tHkMFWCq7W82udPLgHpKNKBbXjqmGJHd0+FYBK9SdfEhUORok10qMZVUK +sL1d7g1xqiRcONMkbl505OPYYdbDADkDtgeXBS1vj+toFnSsyeHMLllHnexjEWksY3R TzSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=IOZ4UrIWwINFcckW1U76kPF9u0Fuu1HU8lT2UbpT2Oc=; b=zOK6mYlN/J9GRM9iZ6de2ts30E04j31xZqoLwaCoZSZeyXaYW7uzaXd0aXtt8P8iRA 6BtgCV9eW6lAlqxs7/SOKiOuRgAPF7ZbLv0/AWIOcfbEZCKy31N508+kK48zkWk9rP2C 6M/IbB+va9dNwz8ssN6+C088/AbkIBU9toEQRU+ErtHIjYX8k2Q1IhwmxswD+7tg4UH/ oiaci+TpL9pe/FArQ/T5HFFQ5lv/wbXQYD1nvQYofXwsywOrCVN4O7ZlPp82k/O7B0zQ lS/l2OP04pqf4eplJu0JrAtQkbTQJA+TgKdgqLYHHYT7UafSMH64yAHYc5wb1TQfRW/l h//A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PVI1QSYu; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id x15-20020a056870a78f00b00169d50d4c48si1322797oao.323.2023.02.02.01.25.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 01:25:42 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PVI1QSYu; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E135D85EEB; Thu, 2 Feb 2023 10:25:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="PVI1QSYu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5921C85EE9; Thu, 2 Feb 2023 10:25:13 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0F94D85ED4 for ; Thu, 2 Feb 2023 10:25:10 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=masahisa.kojima@linaro.org Received: by mail-pj1-x102e.google.com with SMTP id l4-20020a17090a850400b0023013402671so4957873pjn.5 for ; Thu, 02 Feb 2023 01:25:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=IOZ4UrIWwINFcckW1U76kPF9u0Fuu1HU8lT2UbpT2Oc=; b=PVI1QSYuKSNHoAq/74EEGi9g70+OmgzPJeSsS0VAID3IjDmKCu97qr9zIAfBXETwKt 3pe6QDUbCt4AksQ4RVJThQymSpXOykoLJfiyOGZmGWZyUzxHDr713xZgaOn/N3DL9v9X FI/Fn0jsos2hFqHKk/UEmREgEUMLgd3Mv+j7FohtKt2PhOMzACLZk4k/zB89Bd7VmBen rnWga2dWdm2ILVXzXMFdDQGLlXWCaKrU2fnPmfoxYmwaG5A04gcVgNmbgRtbKTJUFUv1 gHeOTVGOta/XAfU/qWpO3lS+s7K+MQaTnTAdDeSuuP/6yUz37sFKUoxmo+xR+uqayAUU /KfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IOZ4UrIWwINFcckW1U76kPF9u0Fuu1HU8lT2UbpT2Oc=; b=G86MmQdpqENRn60o3KJrq0DxTkDp1CJbnFcmyhK5GCtvLasYk8K/NA+rchRrbrCbvI Lqlp5fbC5cJPPRqiOWXbLIBR68yKluXWX5AACzTzOXPf7DgNXmAyJOXsLQ0x9M9W9yzG 6HmMCLf5D8SKDYqCWeTyUr+5gi15VNPxS8oGpyTjor2fi0fa6RdJXzGHZqgZD02Zikp2 x4xjiSo8FT/nIZrF8zHg72rowfc7uRiicpdIYuKpvQ/as5kDx7DHgwEoF3GfCpY0wndB A90ynm8JTqroUbQZDkAxUt8+8YoVlT6b0v9iVqKDrpmt2DYLx4ugAegJ8Ihzt6xAwhwW UlzA== X-Gm-Message-State: AO0yUKUXgAxGstQJBYUMr5Pl63A9X6XF6B2ITolT3iasXAc8uzJT+Uup Rx9c8wqe3Kas38hzRJOLF2TEiZhKPVbtBynj+DE= X-Received: by 2002:a17:902:c60b:b0:196:6c71:ae6 with SMTP id r11-20020a170902c60b00b001966c710ae6mr4286912plr.47.1675329908124; Thu, 02 Feb 2023 01:25:08 -0800 (PST) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id w4-20020a170902a70400b0019619f27525sm13120349plq.302.2023.02.02.01.25.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 01:25:07 -0800 (PST) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Masahisa Kojima , Simon Glass , Stefan Roese , Bin Meng Subject: [PATCH 1/5] menu: remove CTRL+C to quit Date: Thu, 2 Feb 2023 18:24:43 +0900 Message-Id: <20230202092447.28590-2-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230202092447.28590-1-masahisa.kojima@linaro.org> References: <20230202092447.28590-1-masahisa.kojima@linaro.org> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On the sandbox called without "--terminal raw" CTRL+C leaves U-Boot, "ESC/CTRL+C to quit" is misleading. Let's remove CTRL+C to quit key handling from bootmenu and eficonfig menu. Signed-off-by: Masahisa Kojima --- cmd/bootmenu.c | 2 +- cmd/eficonfig.c | 6 +++--- common/menu.c | 1 - doc/usage/cmd/bootmenu.rst | 2 +- lib/efi_loader/efi_console.c | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c index 3236ca5d79..8dc133c236 100644 --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c @@ -437,7 +437,7 @@ static void menu_display_statusline(struct menu *m) printf(ANSI_CURSOR_POSITION, menu->count + 5, 1); puts(ANSI_CLEAR_LINE); printf(ANSI_CURSOR_POSITION, menu->count + 6, 3); - puts("Press UP/DOWN to move, ENTER to select, ESC/CTRL+C to quit"); + puts("Press UP/DOWN to move, ENTER to select, ESC to quit"); puts(ANSI_CLEAR_LINE_TO_END); printf(ANSI_CURSOR_POSITION, menu->count + 7, 1); puts(ANSI_CLEAR_LINE); diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c index 47c04cf536..f365a988d4 100644 --- a/cmd/eficonfig.c +++ b/cmd/eficonfig.c @@ -23,12 +23,12 @@ static struct efi_simple_text_input_protocol *cin; const char *eficonfig_menu_desc = - " Press UP/DOWN to move, ENTER to select, ESC/CTRL+C to quit"; + " Press UP/DOWN to move, ENTER to select, ESC to quit"; static const char *eficonfig_change_boot_order_desc = " Press UP/DOWN to move, +/- to change orde\n" " Press SPACE to activate or deactivate the entry\n" - " Select [Save] to complete, ESC/CTRL+C to quit"; + " Select [Save] to complete, ESC to quit"; static struct efi_simple_text_output_protocol *cout; static int avail_row; @@ -927,7 +927,7 @@ static efi_status_t handle_user_input(u16 *buf, int buf_size, ANSI_CURSOR_POSITION "%s" ANSI_CURSOR_POSITION - " Press ENTER to complete, ESC/CTRL+C to quit", + " Press ENTER to complete, ESC to quit", 0, 1, msg, 8, 1); /* tmp is used to accept user cancel */ diff --git a/common/menu.c b/common/menu.c index cdcdbb2a18..56401695de 100644 --- a/common/menu.c +++ b/common/menu.c @@ -492,7 +492,6 @@ enum bootmenu_key bootmenu_conv_key(int ichar) /* enter key was pressed */ key = BKEY_SELECT; break; - case CTL_CH('c'): case '\e': /* ^C was pressed */ key = BKEY_QUIT; diff --git a/doc/usage/cmd/bootmenu.rst b/doc/usage/cmd/bootmenu.rst index cb3c8d2f93..684a18d8e1 100644 --- a/doc/usage/cmd/bootmenu.rst +++ b/doc/usage/cmd/bootmenu.rst @@ -122,7 +122,7 @@ Example bootmenu is as below:: Default behavior when user exits from the bootmenu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ User can exit from bootmenu by selecting the last entry -"U-Boot console"/"Quit" or ESC/CTRL+C key. +"U-Boot console"/"Quit" or ESC key. When the CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE is disabled, user exits from the bootmenu and returns to the U-Boot console. diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c index 1ed8c7aa36..2c7536107a 100644 --- a/lib/efi_loader/efi_console.c +++ b/lib/efi_loader/efi_console.c @@ -1395,7 +1395,7 @@ efi_status_t efi_console_get_u16_string(struct efi_simple_text_input_protocol *c } else if (key.unicode_char == u'\r') { buf[len] = u'\0'; return EFI_SUCCESS; - } else if (key.unicode_char == 0x3 || key.scan_code == 23) { + } else if (key.scan_code == 23) { return EFI_ABORTED; } else if (key.unicode_char < 0x20) { /* ignore control codes other than Ctrl+C, '\r' and '\b' */