From patchwork Wed Aug 24 06:37:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 599724 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:4388:0:0:0:0 with SMTP id w8csp2943009mae; Tue, 23 Aug 2022 23:37:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR52ww9oUpY7aUoywdGptD2mZ+Dr6bHcb8CeWThTXoc9BxF+C2Y9K3c/N5fHEcnFsftneT1m X-Received: by 2002:a05:6402:447:b0:440:d482:495f with SMTP id p7-20020a056402044700b00440d482495fmr6679599edw.264.1661323054373; Tue, 23 Aug 2022 23:37:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661323054; cv=none; d=google.com; s=arc-20160816; b=yiDXZ+8KovP07I+qSXzUPj0s1v9uT/6y3a7iDJXeJNJOPrOWLEJy43v31/rf2eVlK9 05GLG6p7vSjFAyfG9AGvNFHgnmv8kTZlYIYvGuN+lkU0K24WY/R1/k6baMvteJ13F8rh f6Qlyjm8gS3TpzHu0fJAUOvxIshhFnaGm9i2uQDwZBwtyjHmWemP4j24iWAFb2Ckt4fP 3t94l8D1nXFuIZrqgOjZrqJnY08LR1zlh0+OPuNBj/3ZPckutcCuj3BkyYkl9SBBmhC2 /MltWOKvxGZpLwCUb/rdjooQNMj3sWkyEwYWVaDSYT1orq/I1Ief3R2EYtDSoqds9Yew NWIw== 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=sGeVb2doCbkNCl003stBFQUR4tgTCm+ZHcH9PIiCuwsjtybVhZELxYmmyPUduBgTdF pXT8RoCxGjgpYNn0/psaZmPN8QdDuuo8IUC+4+skXZXHlYkXjY30ocPamZ59BL1qnhPC 6wug+WuyvsVhUCI9waMaV/n8cTC7P+/HGbGswBWjRBG0s4WlCDfu+6WARLw+/r7yKKNd p32Ftu5Z/v0iaAeBUVHuoWZMy+Bb1X6XhhKLuxE7VCaaCgOR8yhS4cB+uJUkULfoA9Uw 8TACzrfq9Js96SpzF+CzkS1Pvz8qGEKTDvEhMqUSeHQGlILId48RslMQZEhAKmKADmvV 8ADw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z+3VplDH; 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 t26-20020a50d71a000000b0043f2402c310si3513425edi.121.2022.08.23.23.37.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Aug 2022 23:37:34 -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=Z+3VplDH; 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 364E384865; Wed, 24 Aug 2022 08:37: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=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="Z+3VplDH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CCA2184840; Wed, 24 Aug 2022 08:36:58 +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-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 079C38484C for ; Wed, 24 Aug 2022 08:36:51 +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-pj1-x1030.google.com with SMTP id c13-20020a17090a4d0d00b001fb6921b42aso581011pjg.2 for ; Tue, 23 Aug 2022 23:36:50 -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; bh=nxxHqT3LQmYnOzhmoQJ9it5hG8dE8c8+kpqf94HPN3Y=; b=Z+3VplDHY15W7A1nRvsG+u6PqAQCDCu912an/AfrVEUuDvjA9IBBHzrotVOt4Ki9nQ VouDbgFSaBNRx3SEy1Bf6Q7lma8r9cWHpi1TytmTX88f1Uup/lJyWFIK1UDO9rGp7yyg LnCHPtz+lQxJtP548xI+h8N/MI//fauokZziT0lNg7pV8iSJ86rtmp5BUH+5YvaytdNt 4CgWpvCDPoNUCKRVvqC21zjTvylHvDjqsU/WjyQyxMnnwMGqpBuyAaAhQ9puF7V37E2j /F29x5gwH9GgzsCUZnb0HiChmDr+O5AHWAib4p9e2dJoLgPNAmoGqBQPa7ZDM5cnU2fh XshQ== 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; bh=nxxHqT3LQmYnOzhmoQJ9it5hG8dE8c8+kpqf94HPN3Y=; b=DPgqnLxa0YZkheJmfEOiBNVvp2EqRBwlPWOECuiWZQ2oYT/7n9WmRxFhQVzBe/DV8p pAQ1G3shHAMPRpU17g7r4J9HKto7GF2I9DuSF5b6v7JVHcIlmVZ+mtRLcrkW2D2jt0rb yia+R86OS0LaNEjdw1my8+/wmi9/j/MNgamEd7Wz47KMxNgCAFpMZZFpCY0f1eJU8SvS La2m3XTBVC/vdwnKjCHsY0HgF+y2wrVti4KlU9I5oYksPwQA/8oKAYZnm88+ZxcRW6JJ rg7jHFh2cZHL3MRjuslFhNqfsdiIouihtPuXFG+5Suu2bn3mkAYyESw3vQ1qOLYd8wTX LIug== X-Gm-Message-State: ACgBeo26d7mCWYSLo5K4Vdi4jGVAy7kt50FwB912k3VKvB8RnwhCkk9E /Me+a2U8TnelNK4xnd2d8yF64iBZqBAqGg== X-Received: by 2002:a17:902:bcc9:b0:16e:fde3:172f with SMTP id o9-20020a170902bcc900b0016efde3172fmr28408061pls.36.1661323010398; Tue, 23 Aug 2022 23:36:50 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id a26-20020aa7971a000000b0052d40c4c06esm6958761pfg.39.2022.08.23.23.36.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Aug 2022 23:36:50 -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 v13 3/9] menu: add KEY_PLUS, KEY_MINUS and KEY_SPACE handling Date: Wed, 24 Aug 2022 15:37:34 +0900 Message-Id: <20220824063740.5760-4-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220824063740.5760-1-masahisa.kojima@linaro.org> References: <20220824063740.5760-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,