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 D5046C4332F for ; Fri, 4 Nov 2022 15:16:50 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 77499851FC; Fri, 4 Nov 2022 16:16:48 +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="iZ6IOqJq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A8AA1851FC; Fri, 4 Nov 2022 16:16:46 +0100 (CET) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450: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 D596184C90 for ; Fri, 4 Nov 2022 16:16:43 +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=ilias.apalodimas@linaro.org Received: by mail-ed1-x533.google.com with SMTP id x2so8092573edd.2 for ; Fri, 04 Nov 2022 08:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=MokXLypa/SyFREzE6OwE4XqnD82NIu7GowDyJ/+T+Y4=; b=iZ6IOqJqT6aZ4lMel2ujR/HZd7LD0MlhZ6LBc4I34aaSV/7B5ZBqzhhi9TdFUoUyS6 sDqLDGIulhobFCl4FH/jhPcajFpV4El3OCgQ8EiniRUwWKWbPAqJHcBNpcXqWqLbXUpN EBfmRrczYs/SZhYaySsCin8MiT91B/l3E1Tbd+dQ58M1b/34Y0kb4uwnFoQ7nnsI0DJz 9b6atm47K+91JD9kM75qOKw1speZr7+Mz2pZaFOqFq3qV5jZtWVFZQDPqD/qYEnKKS7Y hi84e1teiN4C9KL4icyX5WtY7dVifmBqvMDYSttUfM+eul0aj3wUwH3sXUYwc1/4/Mjj p5+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MokXLypa/SyFREzE6OwE4XqnD82NIu7GowDyJ/+T+Y4=; b=Rk7Umx+kc78bZRS/DwwqrZ25LvmNfSurPNXmhszbDl8NxRgMgcKc7cvrJVUaTDJ9+N ygmYfpTVfEOgQ6ZS2FJX+yqrvTikzyjD4jsztT6crQGdCZ2keEz00PDXQReELulkzF6e eJkhWp1GYmalIKdcIKvEtU6+ba2pPQQhtFNbB1IXwoXiyu4gBF2O7683KwhjClVanqJ1 idQGWu3NQX6vOFghds5kLxk0MupdXyVj6XP+U+VzMLC60sj6y1Fiup+EK9v8z538yVs0 aLBxXv/DQEA556Ds81uGUWVcpWFK0RM4QC1uV99XnSt9ju7FVdOCNfz5FPQGi/eJz+OY 6G1g== X-Gm-Message-State: ACrzQf2bpbEPckhJ2nHCES64ARHgcnFU0svFnqdTf0IHdcwONrsj5wJd Ter4Y+uX5z6Zutzeha+e2UZT7w== X-Google-Smtp-Source: AMsMyM7HAAstLrme13IflTYVvj/6XAKLQK/h1UYCr4dHavWFSHcfPFa3Vx54HDZcJ56RPdPQjrheFQ== X-Received: by 2002:a05:6402:294f:b0:461:f5ce:31e8 with SMTP id ed15-20020a056402294f00b00461f5ce31e8mr35706309edb.363.1667575003427; Fri, 04 Nov 2022 08:16:43 -0700 (PDT) Received: from hera (ppp046103046165.access.hol.gr. [46.103.46.165]) by smtp.gmail.com with ESMTPSA id bg9-20020a170906a04900b007ae1e52805dsm1938706ejb.103.2022.11.04.08.16.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 08:16:42 -0700 (PDT) Date: Fri, 4 Nov 2022 17:16:40 +0200 From: Ilias Apalodimas To: Masahisa Kojima Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Simon Glass , Takahiro Akashi , Etienne Carriere Subject: Re: [PATCH v6 2/5] eficonfig: expose append entry function Message-ID: References: <20221026104345.28714-1-masahisa.kojima@linaro.org> <20221026104345.28714-3-masahisa.kojima@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221026104345.28714-3-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 Hi Kojima-san On Wed, Oct 26, 2022 at 07:43:42PM +0900, Masahisa Kojima wrote: > This commit exposes the eficonfig menu entry append function. Can we update the description to something we could look up in the future? e.g 'Following commits are adding support for variable management via the eficonfig menu. Those functions needs to use append_entry and append_quit_entry, so move them out of their static declarations' > > Signed-off-by: Masahisa Kojima > --- > No change since v2 > > newly created in v2 > > cmd/eficonfig.c | 32 +++++++++++++++++--------------- > include/efi_config.h | 5 +++++ > 2 files changed, 22 insertions(+), 15 deletions(-) > > diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c > index f6a99bd01a..0cb0770ac3 100644 > --- a/cmd/eficonfig.c > +++ b/cmd/eficonfig.c > @@ -263,7 +263,7 @@ efi_status_t eficonfig_process_quit(void *data) > } > > /** > - * append_entry() - append menu item > + * eficonfig_append_menu_entry() - append menu item > * > * @efi_menu: pointer to the efimenu structure > * @title: pointer to the entry title > @@ -271,8 +271,9 @@ efi_status_t eficonfig_process_quit(void *data) > * @data: pointer to the data to be passed to each entry callback > * Return: status code > */ > -static efi_status_t append_entry(struct efimenu *efi_menu, > - char *title, eficonfig_entry_func func, void *data) > +efi_status_t eficonfig_append_menu_entry(struct efimenu *efi_menu, > + char *title, eficonfig_entry_func func, > + void *data) > { > struct eficonfig_entry *entry; > > @@ -295,12 +296,12 @@ static efi_status_t append_entry(struct efimenu *efi_menu, > } > > /** > - * append_quit_entry() - append quit entry > + * eficonfig_append_quit_entry() - append quit entry > * > * @efi_menu: pointer to the efimenu structure > * Return: status code > */ > -static efi_status_t append_quit_entry(struct efimenu *efi_menu) > +efi_status_t eficonfig_append_quit_entry(struct efimenu *efi_menu) > { > char *title; > efi_status_t ret; > @@ -309,7 +310,7 @@ static efi_status_t append_quit_entry(struct efimenu *efi_menu) > if (!title) > return EFI_OUT_OF_RESOURCES; > > - ret = append_entry(efi_menu, title, eficonfig_process_quit, NULL); > + ret = eficonfig_append_menu_entry(efi_menu, title, eficonfig_process_quit, NULL); > if (ret != EFI_SUCCESS) > free(title); > > @@ -341,7 +342,7 @@ void *eficonfig_create_fixed_menu(const struct eficonfig_item *items, int count) > if (!title) > goto out; > > - ret = append_entry(efi_menu, title, iter->func, iter->data); > + ret = eficonfig_append_menu_entry(efi_menu, title, iter->func, iter->data); > if (ret != EFI_SUCCESS) { > free(title); > goto out; > @@ -634,14 +635,15 @@ static efi_status_t eficonfig_select_volume(struct eficonfig_select_file_info *f > info->v = v; > info->dp = device_path; > info->file_info = file_info; > - ret = append_entry(efi_menu, devname, eficonfig_volume_selected, info); > + ret = eficonfig_append_menu_entry(efi_menu, devname, eficonfig_volume_selected, > + info); > if (ret != EFI_SUCCESS) { > free(info); > goto out; > } > } > > - ret = append_quit_entry(efi_menu); > + ret = eficonfig_append_quit_entry(efi_menu); > if (ret != EFI_SUCCESS) > goto out; > > @@ -745,8 +747,8 @@ eficonfig_create_file_entry(struct efimenu *efi_menu, u32 count, > (int (*)(const void *, const void *))sort_file); > > for (i = 0; i < entry_num; i++) { > - ret = append_entry(efi_menu, tmp_infos[i]->file_name, > - eficonfig_file_selected, tmp_infos[i]); > + ret = eficonfig_append_menu_entry(efi_menu, tmp_infos[i]->file_name, > + eficonfig_file_selected, tmp_infos[i]); > if (ret != EFI_SUCCESS) > goto out; > } > @@ -815,7 +817,7 @@ static efi_status_t eficonfig_select_file(struct eficonfig_select_file_info *fil > if (ret != EFI_SUCCESS) > goto err; > > - ret = append_quit_entry(efi_menu); > + ret = eficonfig_append_quit_entry(efi_menu); > if (ret != EFI_SUCCESS) > goto err; > > @@ -1218,7 +1220,7 @@ static efi_status_t create_boot_option_entry(struct efimenu *efi_menu, char *tit > utf16_utf8_strcpy(&p, val); > } > > - return append_entry(efi_menu, buf, func, data); > + return eficonfig_append_menu_entry(efi_menu, buf, func, data); > } > > /** > @@ -1677,7 +1679,7 @@ static efi_status_t eficonfig_add_boot_selection_entry(struct efimenu *efi_menu, > utf16_utf8_strcpy(&p, lo.label); > info->boot_index = boot_index; > info->selected = selected; > - ret = append_entry(efi_menu, buf, eficonfig_process_boot_selected, info); > + ret = eficonfig_append_menu_entry(efi_menu, buf, eficonfig_process_boot_selected, info); > if (ret != EFI_SUCCESS) { > free(load_option); > free(info); > @@ -1736,7 +1738,7 @@ static efi_status_t eficonfig_show_boot_selection(unsigned int *selected) > break; > } > > - ret = append_quit_entry(efi_menu); > + ret = eficonfig_append_quit_entry(efi_menu); > if (ret != EFI_SUCCESS) > goto out; > > diff --git a/include/efi_config.h b/include/efi_config.h > index 098cac2115..86bc801211 100644 > --- a/include/efi_config.h > +++ b/include/efi_config.h > @@ -95,4 +95,9 @@ efi_status_t eficonfig_get_unused_bootoption(u16 *buf, > efi_status_t eficonfig_append_bootorder(u16 index); > efi_status_t eficonfig_generate_media_device_boot_option(void); > > +efi_status_t eficonfig_append_menu_entry(struct efimenu *efi_menu, > + char *title, eficonfig_entry_func func, > + void *data); > +efi_status_t eficonfig_append_quit_entry(struct efimenu *efi_menu); > + > #endif > -- > 2.17.1 > Other than that Reviewed-by: Ilias Apalodimas