From patchwork Fri Sep 2 14:23:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 602173 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:4388:0:0:0:0 with SMTP id w8csp1508930mae; Fri, 2 Sep 2022 07:22:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR5S1nm+UaQtw0WOtWa5r18mp2tn3L+kBH099WEogavY1WYSa9P9q23BllkahSWczM9dxjk7 X-Received: by 2002:a17:906:ee89:b0:73d:70c5:1a4e with SMTP id wt9-20020a170906ee8900b0073d70c51a4emr26366286ejb.683.1662128564728; Fri, 02 Sep 2022 07:22:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662128564; cv=none; d=google.com; s=arc-20160816; b=CmaxB92jaX42mNqEx31uCAprwuxmCgzIcrnsLY7AdGZbUxE0evZ7R0UzyJH8OKIb4o hqm7h0426RT6t+sRid/U5VFxOTXLeuCxyQKH6EYVIQpAxahrO/oMuWZcZi0Jh2qFeD5I GBQydBapQk2wnlWQyyoGpFG9B09sd8Do5O2r7ej/FQZ93o+4OljulIWGeZ8sRf1m629z D6XIKfbBwfF6yRmItxpM73wAC0zvtor+aSUiTw13Ts3hacdnBxvXIgQa6es/Km7uxw/p O1T4LkUbGphuEVfbQVhZ77MOcQ3tD38vaTDxoEmI4dsOlY3fuOSKLbL8ywI/XMW63+k8 rYgA== 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=nxxHqT3LQmYnOzhmoQJ9it5hG8dE8c8+kpqf94HPN3Y=; b=1AhFe8dL3S3NUaAQK5PfvTxYlSh0sC357cK9+BBfVyyHXttmrpDXwfVsAKU8F209Z1 AaSZF/MWYNmP44j9BzIfSsbFpOI9pUeEv6C+EHs9xmZZk7/F666fWeuNB6zJ+eRReFwK Gr9ff4PTCKCeyUTovTNAX3dyQn3fYf5+UqfyM0nI6hJSp4jFxdRue7xESas5XJ2sMHrm n43sAJ9Z3XX3TvAh8YadAK0Nx0gl6Ynn7fG864UvR+X/W9ClnIuaRUePPwW0isW6K1mu UgkISYE2DLm1mKZsxQH74a7hLSB9GMy4hKIShjjPs2teeFO88KNYFSxSKFI5J2b2+KZ9 FT7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i1FHJgA9; 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 nb9-20020a1709071c8900b00730ac298aa9si1976557ejc.783.2022.09.02.07.22.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Sep 2022 07:22:44 -0700 (PDT) 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=i1FHJgA9; 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 5C20F84AE4; Fri, 2 Sep 2022 16:22:22 +0200 (CEST) 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="i1FHJgA9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E199784AC0; Fri, 2 Sep 2022 16:22:17 +0200 (CEST) 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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) (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 59E6A84AD6 for ; Fri, 2 Sep 2022 16:22:13 +0200 (CEST) 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-pg1-x52a.google.com with SMTP id q9so2099924pgq.6 for ; Fri, 02 Sep 2022 07:22:13 -0700 (PDT) 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; bh=nxxHqT3LQmYnOzhmoQJ9it5hG8dE8c8+kpqf94HPN3Y=; b=i1FHJgA96mqWqjOPHwA0YKEtsmx7IJ9Y4cTxKhmPx2MB6R3A0vgAG1hmE7Itu9atDu tZnjU3YS8gddTv+UrZGqTacvSfeVdQtP65H+BAwoBfURCHAdvdvvviuYOW2Pc7RA7kxc +YNdPktMvb3NbDwr3U/XnFhc4bF/tOMgRtGkzpHaoNcYAANlEfkTaVtHj2rroxX5bzZq /YPo37dZvrbJacX3b3GyuH6H+2TywH8iFUQWgycC/rzMDfstSpjZtg0TlHBArYi0+a94 azsQ+FQh7o3a8DVoUGKGRhoXQf13u6IBZhENxs5LQgk0Ls/9ZAnP90B0fwzOljrQyasQ iokA== 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; bh=nxxHqT3LQmYnOzhmoQJ9it5hG8dE8c8+kpqf94HPN3Y=; b=Net+DG40+HBCRRop8CBRlzaBzQHD+8FDqwEiSgRvB060un1TMp8JBRNKMJsnYnh0sv WC7RyB4OfJBP/CJEoFGKmBcoqWVB0TE9oQtd2eRIkvdWjK2hvVbRr3oiR/iywk7E5KbI 9ii6gHf3TfT0upBqJegU2vwHqCvOH5+jH8j3faoDQpBqbDwBvEWU4C90/qp7uti0m94e VJdZDx8z4IttVx5np39LgSQFn0xVHQIZKRP+BXHgJax2CzFlP4c95zsJ+OUeeZeGIUFu CzJ4YsMa4XEXSwqzsdZes9DGs3dT4jPExEKiy73JonKVZzywBWibxr4IxODeCw5Ao8k+ VitA== X-Gm-Message-State: ACgBeo3zXkh33JPJR07OYMaGztXDEDE1dqUXgvjWGkmMgBMvkCNA4fKG L6xpnbs+uasGaUM3Z/SQHm0YYnd/UYzWpw== X-Received: by 2002:a63:83c8:0:b0:42b:908c:710 with SMTP id h191-20020a6383c8000000b0042b908c0710mr27713548pge.195.1662128531485; Fri, 02 Sep 2022 07:22:11 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id i8-20020a17090332c800b0017272667a56sm1678485plr.196.2022.09.02.07.22.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Sep 2022 07:22:11 -0700 (PDT) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Mark Kettenis , Masahisa Kojima Subject: [PATCH v15 03/10] menu: add KEY_PLUS, KEY_MINUS and KEY_SPACE handling Date: Fri, 2 Sep 2022 23:23:42 +0900 Message-Id: <20220902142349.16722-4-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220902142349.16722-1-masahisa.kojima@linaro.org> References: <20220902142349.16722-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 This is preparation to support menu-driven UEFI BootOrder variable updated by KEY_PLUS, KEY_MINUS and KEY_SPACE. Signed-off-by: Masahisa Kojima Reviewed-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- No update since v11 Changes in v11: - add SPACE key handling Newly created in v7 common/menu.c | 9 +++++++++ include/menu.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/common/menu.c b/common/menu.c index 3e876b55b3..0d19601cf5 100644 --- a/common/menu.c +++ b/common/menu.c @@ -548,4 +548,13 @@ void bootmenu_loop(struct bootmenu_data *menu, /* ^C was pressed */ if (c == 0x3) *key = KEY_QUIT; + + if (c == '+') + *key = KEY_PLUS; + + if (c == '-') + *key = KEY_MINUS; + + if (c == ' ') + *key = KEY_SPACE; } diff --git a/include/menu.h b/include/menu.h index e74616cae8..702aacb170 100644 --- a/include/menu.h +++ b/include/menu.h @@ -48,6 +48,9 @@ enum bootmenu_key { KEY_DOWN, KEY_SELECT, KEY_QUIT, + KEY_PLUS, + KEY_MINUS, + KEY_SPACE, }; void bootmenu_autoboot_loop(struct bootmenu_data *menu,