From patchwork Wed Aug 24 04:27:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 599714 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:4388:0:0:0:0 with SMTP id w8csp2894478mae; Tue, 23 Aug 2022 21:27:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR5CMY+nZQrGnhGFn/u+phz0WLXWQkM3By2Ztve2xVlAZ5jP1lXN5waqNpCbNWPPbr3fqEbx X-Received: by 2002:a17:906:5d07:b0:730:9e98:8fbf with SMTP id g7-20020a1709065d0700b007309e988fbfmr1589215ejt.610.1661315247181; Tue, 23 Aug 2022 21:27:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661315247; cv=none; d=google.com; s=arc-20160816; b=PYHF6B+smM5pSl+UlIZzYc2+kUpJEZDr0zdozASyTC6spIZIzsj8Y6+1W0KJcQIuo9 9hE9d4doX2tWUTZCPn0dXrAasFIBKT8vf05SNhy08BjFbSkz5BxTiLF9EI6lfRxqy3Wv WjLuBsIDes+PRI7Pg2Kwz/Vtr6x2Vs2zcr665xexGS7xDKiuTMgzpvxMH3Pz8a1SGfhv s67igvRholfMXpVDfiv0qYwpvKlWxIeIIv2+jobXI3OfIfzd9tGuDfDqz6bWcff50Vbl XE9wOg0nZtbJiUyRqpPg1XovQPHY9sQP8FdlxfemklCNUy5wSUDQEZlGRrMlxDOruoK4 DaDg== 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=iDCg7HOXZ8NoxtwVNzL8B/0Srsk8xu2gQbsZolQznETSOjtHgdJ/LI5if38JfrSxU+ cHlGeONyTpYT78rDvM1ek6NuXUKOfD9zlpVIwLQZSxlEbxNkVyBg7wS9c/1JUnzOBNdA UWF5zrvdDGypwNRHs13m6bvAnPmxvKnfbD0/jMavu00G1HqKfZ6SDQYEbqa/gJUV9Q2i k8WqxJA97LslCTbVTFHBHyJQvLi8ToiSUB90i4FxiYrtkAZCYj5sA8dtWri8n6UNiQVe KpAjH/wo01Wwu5lzQQgujTzty3kLVgqL2m7wikql9KuHoDNUCbes8YkTjfC1aiqnbEeM p+EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qeIWyvh3; 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 s3-20020a056402520300b0044202417985si2638315edd.108.2022.08.23.21.27.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Aug 2022 21:27:27 -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=qeIWyvh3; 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 D71FF84820; Wed, 24 Aug 2022 06:27:09 +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="qeIWyvh3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7098C84314; Wed, 24 Aug 2022 06:27:00 +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-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) (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 995798483A for ; Wed, 24 Aug 2022 06:26:54 +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-pf1-x432.google.com with SMTP id f17so9214680pfk.11 for ; Tue, 23 Aug 2022 21:26:54 -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=qeIWyvh3oOGqV1wL7RlCCPwXF+ZOLykH6iDSn/L10vqSUmTmbBvIchM9jxyt+WlHLW XZTW5qJOqQL/V6ApayFQb6WT/YaCW/Hro3rvo01j2hU00SKVvtSusiiKaNlN1jMJTeUT V6CZT4rVhX8lZypoQYf0wEdq0gXVTiqGfJw9GzlVuvkx7pB4wg1D3Du4x77Jswctb5EV q5FS9KXDI8srTA2wc4TouZagY9R/hOkNYr6hfQE78jrEdsl+SeLaEmQYz+n+RQis+K7z rZdD5QpmVVeCrEr6quzeuiL/1ciKsxYQ3W1tPzKg40FVfQOQVdtTiFknxw/zvE7/7vtW fKOQ== 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=j2+agPOanbYGb37O9we5HL/AV1bYUuw+NvemmOkeZi8fGyMH1fngd/1GeoF+mTmUSD G2qhUHUU17Umxc7xiLQ9wQ9tpJlX7mQcUPOVe4Mx94I42FEwap8aXXejGwJiK4fZyrRg CzfXidteBJDU32YPGkBjBmED1IT1YHNL1uWsUL2BFke4cnbBDwTgD2MxhBDLFrs4Ed5n TPRzLgzJ5zMyux9WWCLUK8Q1/oqD1ZP09uInQUYrLwdxZFQ6FKYxgJsz6N0mSWL2dxMk ElF4rGXBsnt7GhYcIRBRsam7pN1JqV5tg8B7d86+pnTBCbgyk0vNh2I1eDgqMTF3O23S JH9w== X-Gm-Message-State: ACgBeo32h9boZD/85SUAXpxM5K3rDXd278Q44MeFDxMAcUHkdySDq0j8 Dz44XnwPZKOQumH859e8aRjiyLCEkgm2BA== X-Received: by 2002:a63:8942:0:b0:429:a15b:4cd2 with SMTP id v63-20020a638942000000b00429a15b4cd2mr22830258pgd.445.1661315212784; Tue, 23 Aug 2022 21:26:52 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id g21-20020a170902d1d500b0016397da033csm11280965plb.62.2022.08.23.21.26.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Aug 2022 21:26:52 -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 v12 3/9] menu: add KEY_PLUS, KEY_MINUS and KEY_SPACE handling Date: Wed, 24 Aug 2022 13:27:43 +0900 Message-Id: <20220824042749.27434-4-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220824042749.27434-1-masahisa.kojima@linaro.org> References: <20220824042749.27434-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,