From patchwork Fri Jul 15 14:47:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 590847 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5817:0:0:0:0 with SMTP id j23csp569964max; Fri, 15 Jul 2022 07:45:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tkiIDnh/KVTylx4tdB7ZJI09ygnyTmITEedU9cB3DpsSp8xYY1dnilkmHhOCdKho2JrssH X-Received: by 2002:a05:6602:2c83:b0:67b:84b2:d94 with SMTP id i3-20020a0566022c8300b0067b84b20d94mr7352826iow.113.1657896357205; Fri, 15 Jul 2022 07:45:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657896357; cv=none; d=google.com; s=arc-20160816; b=dcnISTm/cAFbs/fhATC/TUKDLaADwlm1SUKZIU2FrvsYiVnDAVcu5hdHkZetsl6hYi nSno63axna/ZXZ4m4Ay9ls6RKqyLOFePILNS6Eq/r5MhYMnZdG3+RXigoFfIZGvURsLC KJw598zQlaZ4ubO7qjHDCPUc5vFdUyuxot6aqWVWbbKP0WACdUk9G1CbbOaPtKxts3S5 gbuxBXykQG7B+9nrEic3nvAegMfo6XRwnJt5Mo0gYeQtmnPUQdWNjOYuHOrPPYpYC9ER W7uUPtagaFflcYm7qanoUbIRIaJzdSVHz3CpmeSsoJx2iRF/IHLzwIStL2TKc/E4L3GU BD9w== 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=w+mVP1Njm31l7f2XbiAc9Nmn/WOjAcUUdc/0fUHeZ54=; b=Qb3guiv1kkSc9QU6k2D6C02XDOd+nwfIQP4MryXMrp6DMvt0yyMf2BW2ZpqeCX1aew 54UeT+2kMHpB0HHJ5+Om0cuHwooQwEerkLouUN9kSi6Jd67dpf4bqPpoGFcRjLd4Kcif UoWsm439ZND5BQWeuJd+Re0E78GFo8IImHAFH70IzwEgFTAYz/4p3AiSuE6CH8gDMfrr f0qAprmlOHGvzm5GCv+6+fQYCAZzRoVrQODAPIa+hDlY8qcygQKuAPCUhs3a/WsFY4v/ xYilBtLYLpXpaJf/dj0g9gkomJt8PFBzkVYKUDhP3s2aIMoUb55VPHeE6ob9dDVwfG22 8QmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F3AGEr7d; 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 14-20020a056e0216ce00b002d1b10bbb38si5384896ilx.133.2022.07.15.07.45.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jul 2022 07:45:57 -0700 (PDT) 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=F3AGEr7d; 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 7098C81E51; Fri, 15 Jul 2022 16:45:37 +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="F3AGEr7d"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4640B81877; Fri, 15 Jul 2022 16:45:30 +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-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) (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 3AFC881297 for ; Fri, 15 Jul 2022 16:45:23 +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-pl1-x635.google.com with SMTP id k19so3401666pll.5 for ; Fri, 15 Jul 2022 07:45:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=w+mVP1Njm31l7f2XbiAc9Nmn/WOjAcUUdc/0fUHeZ54=; b=F3AGEr7d60d7Ddk2GUt/uXqWf6NBEpuuyuPuEl0Nti8VKh46UOpZzaxoj32S+/e+B/ d54YwDnbRqWWy29ZD9usLV6nt6ISIVAV37iw1FVmQbwH3fnALz0tC6Ak7qfKTE/ZPpk4 ddQAkg2lpU9PqUwumoCgRwBbRpXsjdi0nYlFwIvqh5CCIepczgZYoKEYKfMftiaHu5BC rltUKEoTr895rExSL1b3ruatq2I03GmdxoyVCh/iMnkbQJyrHa3XjZK21Yt+myeiJnF9 l2nbAjGay4MWUeTHHftqI3tWLcVHM8YP856yXlWWigeERw4Hmk0JW6q5G5VpWsFimm/1 HIxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=w+mVP1Njm31l7f2XbiAc9Nmn/WOjAcUUdc/0fUHeZ54=; b=DYs/rvcQA8EgdBHRmZ0XELm6eI7Afdqt92iHXWfR8tePSesuLp7e8+FJ1nG9rc4mk3 bugYG2iRR4adYExw5drpEmJXkv67VKiwmt6zSP88sKjWsd1yjlePJd0gUsvDHPc3A1nK Rn4kH6f4hazQPypHUZY/mcgl6ks4AwANvdVWFkxJkIkPTXaR+LEyb8AO3gGtweOG3xkx eg5svaTFWlGu+gLeq2Q3EPxxG64jWf8uUQA9gDFEynl8fF3BafPF5PUov/xbmP34B9kK 5nh7mvpyewUeY0tuqOkkIDnGiQROP888ElfxBHPupqig1ffoH0JGbu/tV91fYsveigcg ZwIw== X-Gm-Message-State: AJIora8BGFCAHSGncRbbI/dkHb7OTSOJOwzPHpWxQpwoweyQB6uFAa13 MMy9HR6MY5CG4JC4ih7fatXtkzuXZUdhrg== X-Received: by 2002:a17:90b:3b8a:b0:1ef:b87d:309d with SMTP id pc10-20020a17090b3b8a00b001efb87d309dmr15868595pjb.176.1657896321430; Fri, 15 Jul 2022 07:45:21 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id u16-20020a170903125000b001690d398401sm3719923plh.88.2022.07.15.07.45.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jul 2022 07:45:21 -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: [RESEND v9 4/9] menu: add KEY_PLUS and KEY_MINUS handling Date: Fri, 15 Jul 2022 23:47:44 +0900 Message-Id: <20220715144749.30564-5-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220715144749.30564-1-masahisa.kojima@linaro.org> References: <20220715144749.30564-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 and KEY_MINUS. Signed-off-by: Masahisa Kojima Reviewed-by: Heinrich Schuchardt Reviewed-by: Ilias Apalodimas --- No change since v7 Newly created in v7 common/menu.c | 6 ++++++ include/menu.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/common/menu.c b/common/menu.c index 3e876b55b3..3470f95a98 100644 --- a/common/menu.c +++ b/common/menu.c @@ -548,4 +548,10 @@ 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; } diff --git a/include/menu.h b/include/menu.h index e74616cae8..4c32e74ce9 100644 --- a/include/menu.h +++ b/include/menu.h @@ -48,6 +48,8 @@ enum bootmenu_key { KEY_DOWN, KEY_SELECT, KEY_QUIT, + KEY_PLUS, + KEY_MINUS, }; void bootmenu_autoboot_loop(struct bootmenu_data *menu,