From patchwork Thu Apr 28 08:09:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 567129 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp5232635map; Thu, 28 Apr 2022 01:11:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzWDcl5HAelbRtRLbiRO/jChDEWTyWiD1eB5/dEGrrl28XNue+SukJwUMq+YOR9Jhvwi7k X-Received: by 2002:a17:907:86a4:b0:6f3:ac7f:e9a2 with SMTP id qa36-20020a17090786a400b006f3ac7fe9a2mr12885521ejc.317.1651133500869; Thu, 28 Apr 2022 01:11:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651133500; cv=none; d=google.com; s=arc-20160816; b=xIf6AnJjvTgb9g7Orz7wMunzzzSRCUr3GV7Y9gVyChr79r8ITeFKrkG3O7ToBkQtwL IveHG308/dh4PP4ZTpSk0v7jiFNuTAdCPNzw1Nue7O8SouGRBmE7aRoA8FvvBQvow4ES eoLiiDhdcD/BZ0jx/RSE6Dy0R0WEfnW8Z/pKPurB6MceBDF1GJ4FMbRFcZ4JowzgcTld dCYHQh5UOJyZd/dWYxh5oiSFX7V4IgFyDYZyVgd7fXosxg6aolyY4pd2pqKi/7EjdlW0 MOWeo61rye4w3+Cx28DIWq7PfpHAhAerKHpd6Uc4hsegMDZmvtVFlxHIgfWQwa8i6gV/ N9SQ== 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=TvFMYVvCihxIbsCZUiFnET6ZrMQ6iJOCvVE3fpXk/QE=; b=JCgvebnhgjfqJWAqmU7L6ld/4Sp5BJGzMWobZGNvzd6bObOu9xbCsCYW8HDvoZXFTh qDfS28y9AmiD58/nmcAWMuXdHsfCfY4uur4MGS2cb3W2ECB8A9aWlkOjWnKAe5tpd3Ul 67WP/Rq9LYoYEvkKkRM6VK/2RJ2yqTUq2YppKqSEyh7A7v+pfu5PiL1lwIOcpN3/QEn0 6KBbGP0z0fqJXsdmd9aelESTO5R9cvTzXFP1zp9f4vsE/7eU4vRX0q+YhiRfRoArdpa+ oDLWGoes8HH1dkX8nfgdLXDP8maKmGjrNrrmfVsnzfhDkFv3JpKNtvsFdDF4Yeb1cQvl 1QrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S7VFvGBz; 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 re19-20020a170906d8d300b006f3891ead87si3206383ejb.802.2022.04.28.01.11.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Apr 2022 01:11:40 -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=S7VFvGBz; 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 B1EBF83EDA; Thu, 28 Apr 2022 10:11:21 +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="S7VFvGBz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6AC7883ECA; Thu, 28 Apr 2022 10:10:55 +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 autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) (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 CC3F581A02 for ; Thu, 28 Apr 2022 10:10:50 +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-x633.google.com with SMTP id b12so3696524plg.4 for ; Thu, 28 Apr 2022 01:10:50 -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=TvFMYVvCihxIbsCZUiFnET6ZrMQ6iJOCvVE3fpXk/QE=; b=S7VFvGBzuQE0CSGAaRxEgxqtpRNLyuvowo80buWQczDg4p1Euk99BS0OYh70UcgzKQ 0/Q5hoXhci4yULFq/tJK55ROsf8W4uB0wAt2xzdGOMVLZPkiB41Z2mFjjfjar/YauKUo gGWE4jPOxePWp8JeNoUETAYH+meYUOhP/WelBSyhBJ1nYkAWBj9Dzmsrr/fQ9l2Jlcr+ I8fotqRM+wAoJ5nZgL5A8JJPK0RchMqZHl1arhT7l7KQ6Ba4rvzrMv2duG+p5pTxjYeO +o80iMeV9SiDD1xsAWApFlkH8J8oTSzfM6jd121kGWFniHZCddqaUCMrYqnjlzGt6Otr W75Q== 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=TvFMYVvCihxIbsCZUiFnET6ZrMQ6iJOCvVE3fpXk/QE=; b=HkIpXTjchSv//aO8jA41vr1w2YhGkmcJea8eByXnqIQN4oi2wGXC2zL0I02/Xt7N7S XIDbj6mPxCdMNKuYqNV5Jm/BHEwIglVDDqluXSCd9iWOikV2fLUgB6mWutWOMkgYjjqq sNPDDEmLYvPtV2NJcAO1w/yOTjhu0ir02/Y/O6iyhcuhdeSmlS9W8A3lfqR9iIqc7yxp pjYTsxoXGrID9yp5mDHnFYilJnzMASG8d5zTCsr7tyaQSxVpv4hqTizva/2BDX6pMJ8G T8sloLKEvh/gVs/3GNxnnxP0xKef9uRIqT+Jy9cdD6/9YwPmQUrIva8LFXKy9qUkCXjR 1o+A== X-Gm-Message-State: AOAM5314kHl/Fn9VTWPZCCRhxoNPojANXqOpT0+VlTx5IyPaDqs3/4+q QKcyqCv4w/FBupdVFAPCh9PzpePVuY+PHg== X-Received: by 2002:a17:90b:1803:b0:1d9:a23a:3f15 with SMTP id lw3-20020a17090b180300b001d9a23a3f15mr16710323pjb.11.1651133444096; Thu, 28 Apr 2022 01:10:44 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id b15-20020a17090a7acf00b001cd4989ff5fsm5684259pjl.38.2022.04.28.01.10.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Apr 2022 01:10:43 -0700 (PDT) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Francois Ozog , Mark Kettenis , Masahisa Kojima Subject: [PATCH v5 03/17] menu: always show the menu regardless of the number of entry Date: Thu, 28 Apr 2022 17:09:36 +0900 Message-Id: <20220428080950.23509-4-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220428080950.23509-1-masahisa.kojima@linaro.org> References: <20220428080950.23509-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.5 at phobos.denx.de X-Virus-Status: Clean To make user aware of the menu entry selection, menu always appears regardless of the number of entry. Signed-off-by: Masahisa Kojima Reviewed-by: Heinrich Schuchardt --- No changes since v4 Newly created in v4 common/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/menu.c b/common/menu.c index 5fb2ffbd06..b577d80b4f 100644 --- a/common/menu.c +++ b/common/menu.c @@ -271,7 +271,7 @@ int menu_get_choice(struct menu *m, void **choice) if (!m || !choice) return -EINVAL; - if (!m->prompt || m->item_cnt == 1) + if (!m->prompt) return menu_default_choice(m, choice); return menu_interactive_choice(m, choice);