From patchwork Thu Mar 24 13:54: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: 553915 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp4438502mag; Thu, 24 Mar 2022 06:55:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzN/ldRANLdmthPr1FuICBUxAlcPrG9x1B3qAgnKVvQrDKu1iiwPGSZpWWOchdv0hlikrDL X-Received: by 2002:a17:907:980a:b0:6db:799c:cb44 with SMTP id ji10-20020a170907980a00b006db799ccb44mr5864862ejc.485.1648130143218; Thu, 24 Mar 2022 06:55:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648130143; cv=none; d=google.com; s=arc-20160816; b=JUyA111ukKFerYhbau9oQk/IwyLTrGAUxy0XOvm9/aKo2xw6EF1n0fmCQa0g8U5MLE YfvjuvBb0jVyieixyHIAhrGSW9My98RHYJ6kbRhuXC57EMQhM6SnM8HwgGfjNp/Abdpz 6VDstZH9GsCatzBGbUOlKgWMUhRQcmJ9Li38/SCcj8ZTixr9x1g0GNHDzen07TKHt0Vb 4Vx3Gmhny/DcFkbKVCV9MzW6TMVtDOPZQsj1PSyrOoWapZaVhzzkAdgFj/E6rmLO+dwl SU+TKAChclljGE5eSy2w378Huu44d/dGYIdbjTgQdyGQmcLfLzKZRH2neDOWAvp2+Nsc 7OZg== 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=inPoRgeH+VJX8pUin3UaTZQE8S9q7KobOwG0AX/qUsU=; b=gI4wtWuDNCxsN5W0awaN5nwPnmbgJa3PTeIa1eIEPbXH+7PhyfYUruVdBIGDqTPrKq CIevU2bjY+G11nWco9ZIuKFFXriOfTgb+5lbZ2VdO/PzgzUqniYrL9KFmZxi/BDEb5fA FaxFuWwy7aSXzUcoYDdLaH5S7Zxt1AGAKcFrN0xP4YCIJVHTWCIwMtIcFjbONKZEc2+x Epe+E+3eYa5pEpLaVtmF/BaGC7WzOf2X03OygiAGodCCXUWkiZd87GBSZmJH+ou/NN1k oLlnOPYse6olLdMLRWU8sc4qxUDx8Zh5GK4+/6PezYc+f87cydRkRoQjK3v2vV/UyXMy jkiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Deb6nchD; 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 b16-20020a170906729000b006df76385bccsi14047462ejl.108.2022.03.24.06.55.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Mar 2022 06:55:43 -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=Deb6nchD; 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 4273B840C9; Thu, 24 Mar 2022 14:55:05 +0100 (CET) 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="Deb6nchD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4332A840BF; Thu, 24 Mar 2022 14:54:53 +0100 (CET) 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-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) (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 45046840B4 for ; Thu, 24 Mar 2022 14:54:50 +0100 (CET) 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-x102b.google.com with SMTP id mj15-20020a17090b368f00b001c637aa358eso9591336pjb.0 for ; Thu, 24 Mar 2022 06:54: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=inPoRgeH+VJX8pUin3UaTZQE8S9q7KobOwG0AX/qUsU=; b=Deb6nchDY67BiIer70SW72Atux6OMNUtHI6fgd9Z7xfKrxjv8cdjlwr+Wf7YJW6FWB rQkLx0tUbhJQkBbYCtMd7ijAUjjQnv1+m5IskhsxLsYETKW/Xn045gPm+vgIus9PUU6O pwcMbV/fjBlbUEvXkQ1C57qUeHcwg13K0kldcAClRLw3N+Cd0YyOTqEUaEpCCCvobPuX foxz/wSUzEo/LQN/TV5kb/qvypUpgTkpViE5sw708mWAmFotfQKERJtXnWrVER5yekbH p0kapZKIvpH/YpyEElJHxKFWX/zsN5eqU1NFba6C5I5O9j2KxXD8uRsnuNjG0cCr54gR IWhw== 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=inPoRgeH+VJX8pUin3UaTZQE8S9q7KobOwG0AX/qUsU=; b=3647cYCL39FWrAtQnNpLVLWGLLiG/uvGJr8zi1U47d5yY2HNSSSzGfQU7Xqsb6bhze nZjNtzibgJrLLMetdbn79UqmZ7FG1SMe99+mZXteZt5LasgZtA9fuEOy+ohg7LVkwhcM //cK+OvEdxgTWbFXccB5lYNUkC4hme/1yxeeFmCjMTfHGfJxm5fs/smVfIh2at1M2LyP RMIkRDRndxld+/Wivk0/Fn863IARW9GlM4upBKo9Y65CZMfZRrrR465IYY49R1R68DG7 OSLQX9VdkaMRx81Y6gI8rfBasrgOS32acX1ODoaNPeN0Ksbw9XWWP5/TrDqkrxtIESgc 4GIg== X-Gm-Message-State: AOAM531VjArwxm2A2zti9psllLUr24On+uYtXzs22XoFjL5mWBHhxXqd 50nj6OJMRaEEj6Hel3ib0D3cuGj6Bo8ejA== X-Received: by 2002:a17:903:20c:b0:154:b58:d424 with SMTP id r12-20020a170903020c00b001540b58d424mr5789787plh.45.1648130088527; Thu, 24 Mar 2022 06:54:48 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id p15-20020a056a000a0f00b004f7c63cba5asm3974609pfh.21.2022.03.24.06.54.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Mar 2022 06:54:48 -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 v4 04/11] menu: always show the menu regardless of the number of entry Date: Thu, 24 Mar 2022 22:54:36 +0900 Message-Id: <20220324135443.1571-5-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220324135443.1571-1-masahisa.kojima@linaro.org> References: <20220324135443.1571-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 --- 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);