From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 85600C43334 for ; Fri, 22 Jul 2022 02:36:55 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 31F8D840CB; Fri, 22 Jul 2022 04:36:35 +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="BOPiD9Dd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3408D84100; Fri, 22 Jul 2022 04:36:31 +0200 (CEST) Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) (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 EDBF484108 for ; Fri, 22 Jul 2022 04:36:25 +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-x533.google.com with SMTP id 6so3283933pgb.13 for ; Thu, 21 Jul 2022 19:36:25 -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=jYOlbLF1/zFn/x/HU3OCoCjs2DZWhCqRbD3yzDf05o0=; b=BOPiD9DdDau6+ZiXnpedgFQ2+T3tCObdni93LNWVdfOzFfLzIphZIkbRSsFBP3/ey1 toO9FYZoM+0mE5wXx712/371ZLVnCcRZCTyEFYSoDvFW2kiY9nj+YYuuKuu4oV9QtZJ4 6ehSlFaD3ocsQJ2z5NZhtccMNcGfl8HYxPd2siDVSiRy+ptqQfHHOSe7/mlxSdcAgoWm 6GMn11L+8sDF4/TJyu5Yv7SGYc2kAec0Ej0M04jGjumyMns+kw5DDY9MMHt0v8KW6sY/ lZ5bvcrLqHg9KX11ehMWleau6MsNcRpeyfwYdC5dL6uyMgJqxbDGkjJXQujVZHcpPNcZ N06A== 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=jYOlbLF1/zFn/x/HU3OCoCjs2DZWhCqRbD3yzDf05o0=; b=NldobPH2BUMdB1OktirgtzdiYTVQRhFLRG2m+KHRg0FFVL+4yr9l3R5o6t31wMtyvC muNKFvKANvbkGiR4VYIJKU9+H4tUfFMdEfSfXTKYvVnrgu7cu3ZH+wgCAwDDeS9T5Dp4 DpYvvxPD8M73aOWTg2nwSI2ifcPm2Ex5Hdu4/XWoY1vLzuNTDvxL+HPYT8iX/UREgTU8 lraA5DwydE+3ycf+cEcj7H+IIa3M26tIuTaZlmDvWIFemT0SOyrhoUB1JjYh9WIZmsn4 DevkomQEmW0XVIxH60MzIstuwkN7o5/ys0oPCLKSvJ1QxmcgGNzrj403gy9AlBWvXqty 91iA== X-Gm-Message-State: AJIora+TNG7tPeO9c8m7Q2F5rDfcOnTtwwLGQsuZ78ICBw8jkEbWeTAr /uDPIxmKKskJbMePKCJvWuRDl45Vxxf/nw== X-Google-Smtp-Source: AGRyM1u6lQFjIFhsGKXKIP7HxQzaeyfIfGRNrNFZOsA7qKseVVifaMvixJpTywKbjVMPyc5RJPUF+Q== X-Received: by 2002:a05:6a00:319e:b0:52b:aa23:bb02 with SMTP id bj30-20020a056a00319e00b0052baa23bb02mr1174114pfb.43.1658457383259; Thu, 21 Jul 2022 19:36:23 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id k21-20020aa79735000000b0051c758a3957sm2509896pfg.149.2022.07.21.19.36.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 19:36:22 -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 v10 04/10] menu: add KEY_PLUS and KEY_MINUS handling Date: Fri, 22 Jul 2022 11:39:13 +0900 Message-Id: <20220722023919.19676-5-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220722023919.19676-1-masahisa.kojima@linaro.org> References: <20220722023919.19676-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, -- 2.17.1