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 409C7C433EF for ; Wed, 30 Mar 2022 08:56:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 64EFC83B21; Wed, 30 Mar 2022 10:55:57 +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="MTE95P/W"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 38C548403C; Wed, 30 Mar 2022 10:55:55 +0200 (CEST) Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (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 2932083AF6 for ; Wed, 30 Mar 2022 10:55: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=ilias.apalodimas@linaro.org Received: by mail-wr1-x436.google.com with SMTP id m30so28261293wrb.1 for ; Wed, 30 Mar 2022 01:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=2ugBKrZameRXQ8KqZTTnncsxN1x4vlxLlnbcShoGdsc=; b=MTE95P/WVsUd7zrZq8/Ky3mWzwaEgjE68TSXxlVxS52Kv3IS0+2cCaLJGn+2XZxsnA 4k7AG5FS8m0+7zQVsV61/02cBn4HJjOxsJyhFZGsgTLR2BYEe9GsilJ/lyAQu4wjrN44 n/zJ1a7imVAljEJ+1oja3Wf5IkJf8k1oJnPsRGCc+qwha/YZEUdWp9jHEk65ualonV26 zCC9ji4gjsxzqKvTEzuc7xPlsLCdtYousXKMR9V3PNC8395xbjbJ3vsMfURvSJqDTrhD MdqJ6ZZTjKVVIKgSEFBPvx9IYVqayI9QRFqXNGlz/dDTnMwpCP+1M2QKq7oQw8K2vfSl 3LMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2ugBKrZameRXQ8KqZTTnncsxN1x4vlxLlnbcShoGdsc=; b=Ma8qlfqjQzASZ3ipChi5bwzr+R/VUoHVIffTu+jr8Ao10zC/3zCJmHc7ZhQpWWIbeS iHgmTgYfAjRV/cazClzDlVIb6gbUnpGw7DLhryl/xI5vpjEnF3NWBLjGbWPDzYS+q3vE x/P3/Pyxljr5z8E4xZuIZk9HiBvhdk1CYikP38ZW7lMtQkaU3eXGSGtB06YroOsjgxyf YtuFg4/A9iHacBRu293bdAVbzSzsbh0wfe9A+ReHkVfd2N8WlsJqsPYrh8TrncVTXfue YAYfqqteRNnYO7eBcbY7NSfr150QVYIZBxq90NKuzqWlGnQsd4pJ4a8bsj7D8n5BiKRA 8bsA== X-Gm-Message-State: AOAM533EUdKEDNbA+0lvWLFHmScDNN7yqCgi58LbB/IU7KlhQ4OseHsR +VIznrwk6BAzTR+2V8IIxyzeUQ== X-Google-Smtp-Source: ABdhPJzDZtK22GIP9AGdrTDzgum9EcGLmnjU1OnnudOQwKDgJdC8Q/a7SVztuz3vwAtJGo4Kniv7CQ== X-Received: by 2002:a05:6000:184d:b0:205:9bda:8a63 with SMTP id c13-20020a056000184d00b002059bda8a63mr31625623wri.478.1648630550780; Wed, 30 Mar 2022 01:55:50 -0700 (PDT) Received: from hades (athedsl-4461682.home.otenet.gr. [94.71.4.98]) by smtp.gmail.com with ESMTPSA id n20-20020a05600c4f9400b0038cbd13e06esm4279786wmq.2.2022.03.30.01.55.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 01:55:50 -0700 (PDT) Date: Wed, 30 Mar 2022 11:55:47 +0300 From: Ilias Apalodimas To: Masahisa Kojima Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Simon Glass , Takahiro Akashi , Francois Ozog , Mark Kettenis Subject: Re: [PATCH v4 01/11] bootmenu: fix menu API error handling Message-ID: References: <20220324135443.1571-1-masahisa.kojima@linaro.org> <20220324135443.1571-2-masahisa.kojima@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220324135443.1571-2-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 On Thu, Mar 24, 2022 at 10:54:33PM +0900, Masahisa Kojima wrote: > U-Boot menu framework(common/menu.c) returns 1 if it is successful, > returns negative value if it fails. > > Signed-off-by: Masahisa Kojima > --- > Newly added in v4 > > cmd/bootmenu.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c > index 409ef9a848..d573487272 100644 > --- a/cmd/bootmenu.c > +++ b/cmd/bootmenu.c > @@ -463,7 +463,7 @@ static void bootmenu_show(int delay) > } > > for (iter = bootmenu->first; iter; iter = iter->next) { > - if (!menu_item_add(menu, iter->key, iter)) > + if (menu_item_add(menu, iter->key, iter) != 1) > goto cleanup; > } > > @@ -476,7 +476,7 @@ static void bootmenu_show(int delay) > > init = 1; > > - if (menu_get_choice(menu, &choice)) { > + if (menu_get_choice(menu, &choice) == 1) { > iter = choice; > title = strdup(iter->title); > command = strdup(iter->command); > -- > 2.17.1 > Acked-by: Ilias Apalodimas