From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Masahisa Kojima <masahisa.kojima@linaro.org>
Cc: u-boot@lists.denx.de, Heinrich Schuchardt <xypron.glpk@gmx.de>,
Simon Glass <sjg@chromium.org>,
Takahiro Akashi <takahiro.akashi@linaro.org>,
Etienne Carriere <etienne.carriere@linaro.org>
Subject: Re: [PATCH v6 2/5] eficonfig: expose append entry function
Date: Fri, 4 Nov 2022 17:16:40 +0200 [thread overview]
Message-ID: <Y2Us2D8GaQVgYqAn@hera> (raw)
In-Reply-To: <20221026104345.28714-3-masahisa.kojima@linaro.org>
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 <masahisa.kojima@linaro.org>
> ---
> 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 <ilias.apalodimas@linaro.org>
next prev parent reply other threads:[~2022-11-04 15:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-26 10:43 [PATCH v6 0/5] eficonfig: add UEFI Secure Boot key maintenance interface Masahisa Kojima
2022-10-26 10:43 ` [PATCH v6 1/5] eficonfig: refactor eficonfig_select_file_handler() Masahisa Kojima
2022-11-04 15:12 ` Ilias Apalodimas
2022-11-07 2:31 ` Masahisa Kojima
2022-10-26 10:43 ` [PATCH v6 2/5] eficonfig: expose append entry function Masahisa Kojima
2022-11-04 15:16 ` Ilias Apalodimas [this message]
2022-11-07 2:32 ` Masahisa Kojima
2022-10-26 10:43 ` [PATCH v6 3/5] eficonfig: refactor change boot order implementation Masahisa Kojima
2022-11-04 22:08 ` Ilias Apalodimas
2022-11-07 3:18 ` Masahisa Kojima
2022-10-26 10:43 ` [PATCH v6 4/5] eficonfig: add UEFI Secure Boot Key enrollment interface Masahisa Kojima
2022-11-04 21:46 ` Ilias Apalodimas
2022-11-07 3:12 ` Masahisa Kojima
2022-11-07 13:27 ` Ilias Apalodimas
2022-11-07 13:37 ` Ilias Apalodimas
2022-10-26 10:43 ` [PATCH v6 5/5] eficonfig: add "Show/Delete Signature Database" menu entry Masahisa Kojima
-- strict thread matches above, loose matches on Subject: below --
2022-11-09 3:28 [PATCH v6 0/5] eficonfig: add UEFI Secure Boot key maintenance interface Masahisa Kojima
2022-11-09 3:29 ` [PATCH v6 2/5] eficonfig: expose append entry function Masahisa Kojima
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y2Us2D8GaQVgYqAn@hera \
--to=ilias.apalodimas@linaro.org \
--cc=etienne.carriere@linaro.org \
--cc=masahisa.kojima@linaro.org \
--cc=sjg@chromium.org \
--cc=takahiro.akashi@linaro.org \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox