From patchwork Thu Feb 2 09:24:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 649655 Delivered-To: patch@linaro.org Received: by 2002:a17:522:d8c:b0:4be:c3dc:14d8 with SMTP id d12csp135618pva; Thu, 2 Feb 2023 01:26:17 -0800 (PST) X-Google-Smtp-Source: AK7set/YtOyt6R+rEv7gdESW7ePc7y4FvOblMpg8rMd1XLRgYFWMDlLmnooBhiWLXCAZZclVVv+r X-Received: by 2002:a05:6808:cd:b0:378:2ded:5aa6 with SMTP id t13-20020a05680800cd00b003782ded5aa6mr2243382oic.48.1675329977603; Thu, 02 Feb 2023 01:26:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675329977; cv=none; d=google.com; s=arc-20160816; b=kZeLbbf921S2VDd6tDRnbquyulktPiSbA1OL9ByrxEjGTrHRHGb4iBzAVRDPKBvt2n z1yG35m3Y2kbNxFOPCy157dQflj+2+CsSn9NXFxbcAiRrQBtFTSb+l+jEe/uY8bUAYKk tvk2bli/NY+aisMhscCFgMdBcpvybzZCrUxMf4OJA8c/e8IpWii084o+ngmAtq4VwawA YKKQhy6AtT/XCcy9z/ey/1wLDcLjCkntDalVVV7xAmdAhWwudRBv5tzQATKtyIBIWgwU w4KlDoHXAWTJiyZEEul4MDKEMx3W8TDN4cmY/QTzGZv4l21R92Fu+8zHJKAiXeBasrKY KD1w== 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=HWbZX67udIJoRWBFrQ5g7bNLFOwtmiEOT0ZUc2AjphI=; b=OCQ51/G5zUmXqmDyuqo8YmOQAu9X01pQBfMOxGlwPHzeNOI++XmGDWRq+tfdKvvJIJ hRvSMAnr+rIPRIvobdPZ0H+c8LJ4bnmkwoOLpTriScXb9YpyuFnAI1cQR+C+LH8sWnZE 7fE0Kf/L5bwnZKIwIqILQEmTknw6Zhx7d4ZfDeEN0jVSIp8q4j9FI+3fGYP4l5AsyIt1 WFmE1GqPd/qAt81kvMP1zhhwyVOERmA0K09fAVi6q+Be9rgfF6lzCM+6FXWBUXFRMLwG 0syTXjfe45+ed3Ax3GNvaPpnKLbTtC8DZ6ZtSwjqyZ4xM+kzznWXUfJAYcksijyzUHGw edZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S2yT+L37; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id 5-20020aca0d05000000b0037884426d52si6204876oin.95.2023.02.02.01.26.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 01:26:17 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S2yT+L37; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 76C8485EEC; Thu, 2 Feb 2023 10:25:21 +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="S2yT+L37"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5478585EEC; Thu, 2 Feb 2023 10:25:17 +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=unavailable autolearn_force=no version=3.4.2 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) (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 DAAA285EE8 for ; Thu, 2 Feb 2023 10:25:12 +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-x1030.google.com with SMTP id e10-20020a17090a630a00b0022bedd66e6dso4990476pjj.1 for ; Thu, 02 Feb 2023 01:25:12 -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=HWbZX67udIJoRWBFrQ5g7bNLFOwtmiEOT0ZUc2AjphI=; b=S2yT+L37kQ1mhoQVpyWt4GklwngR/gJMaFIkq0HKuzw+8eZcGTfJ80NiRc5afZ6N1G aebmx0P0S3tgeVtxPyCW0fm2SVHubLScO7LW4jaLethAPu/EbGQQrE2B2d94nVYhKKep U5VzptJlLMnh8V/SUj+jV9l7sjv5FcnJQ9dpvIe6oik0hDuxfoerNBq6AEHS5B2sv8v9 ffubVnTT5XE8GnKC7iW1k06mfM2DC6dvlYfYpNam85SpFM3+YeTRY1s87iMmxyGNGUck RelwmlUaUvLffE/HKMCUlaD7NCA90YxWI0wIDBDCjEqGd8EUDe15iP76s1bR0AJTw6e8 /hag== 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=HWbZX67udIJoRWBFrQ5g7bNLFOwtmiEOT0ZUc2AjphI=; b=HINRT2wcSqYZPJcT28grzQ8Z28scO5h66EisRKhwDQ2BJ0R1SUfk43/SLjD20Re/3M deMgNrX0C7azIe+RNetRx3I7CHXfb5Cij30YxaBpGWzJrdoTsgdgO16q+3B6KG2qtaT+ ABRQFXSXw4csFI4PY7AEDtCntU6YunCrDH+SI8djYuAGfuZRwqNLARrFbAi12PLUDd0G MY/gcILYFaJGUbnl1rkdzO7rjP1UBBoertz4eTgj+yi8T7p/I6yG6PaQ8BtbV9Rl51h1 mRO4AG5h0ygWCJ5kPz5ZxlrPjQnQEeEh+/3CI52SR/3uL5FrlJGwF7YjHUsAcj5b8YwS KgNg== X-Gm-Message-State: AO0yUKWOUU6BQ4hl5sYWBBmzKeDkq9xjt/1F9xpjZNVQaJ+HMXs9QqGB KO9hRtVGeVvWGz/rRoLGm4Z6ENCHNmclYGBJH/U= X-Received: by 2002:a17:902:db08:b0:196:6577:5a96 with SMTP id m8-20020a170902db0800b0019665775a96mr7743859plx.30.1675329910914; Thu, 02 Feb 2023 01:25:10 -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.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 01:25:10 -0800 (PST) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Masahisa Kojima , Simon Glass , Stefan Roese Subject: [PATCH 2/5] eficonfig: CTRL+S to save the boot order Date: Thu, 2 Feb 2023 18:24:44 +0900 Message-Id: <20230202092447.28590-3-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 The change boot order menu in eficonfig can have at most INT_MAX lines and it is troublesome to scroll down to the "Save" entry. This commit assigns CTRL+S to save the boot order. Signed-off-by: Masahisa Kojima --- cmd/eficonfig.c | 6 +++++- common/menu.c | 3 +++ include/menu.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c index f365a988d4..0a17b8cf34 100644 --- a/cmd/eficonfig.c +++ b/cmd/eficonfig.c @@ -28,7 +28,7 @@ const char *eficonfig_menu_desc = 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 to quit"; + " CTRL+S to save, ESC to quit"; static struct efi_simple_text_output_protocol *cout; static int avail_row; @@ -1983,6 +1983,10 @@ char *eficonfig_choice_change_boot_order(void *data) eficonfig_menu_down(efi_menu); return NULL; + case BKEY_SAVE: + /* force to select "Save" entry */ + efi_menu->active = efi_menu->count - 2; + fallthrough; case BKEY_SELECT: /* "Save" */ if (efi_menu->active == efi_menu->count - 2) { diff --git a/common/menu.c b/common/menu.c index 56401695de..da08f17747 100644 --- a/common/menu.c +++ b/common/menu.c @@ -502,6 +502,9 @@ enum bootmenu_key bootmenu_conv_key(int ichar) case CTL_CH('n'): key = BKEY_DOWN; break; + case CTL_CH('s'): + key = BKEY_SAVE; + break; case '+': key = BKEY_PLUS; break; diff --git a/include/menu.h b/include/menu.h index 1e88141d6b..64ce89b7d2 100644 --- a/include/menu.h +++ b/include/menu.h @@ -53,6 +53,7 @@ enum bootmenu_key { BKEY_PLUS, BKEY_MINUS, BKEY_SPACE, + BKEY_SAVE, BKEY_COUNT, };