[PATCH 1/3] eficonfig: refactor eficonfig_process_common function
Masahisa Kojima
masahisa.kojima at linaro.org
Thu Dec 22 11:22:13 CET 2022
Hi Ilias,
On Thu, 22 Dec 2022 at 18:59, Ilias Apalodimas
<ilias.apalodimas at linaro.org> wrote:
>
> Hi Kojima-san
>
>
> On Wed, Dec 21, 2022 at 10:50:36PM +0900, Masahisa Kojima wrote:
> > Current change boot order implementation does not call
> > eficonfig_process_common() and call own menu functions
> > for display_statusline, item_data_print and item_choice.
> > Change boot order functionality should call
> > eficonfig_process_common() to improve maintenanceability.
> >
> > This commit is a preparation to remove the change boot
> > order specific implementation. The menu functions
> > (display_statusline, item_data_print and item_choice) are
> > added as argument of eficonfig_process_common().
> > The menu description string displayed at the bottom of
> > the menu is also added as argument.
> >
> > Signed-off-by: Masahisa Kojima <masahisa.kojima at linaro.org>
> > ---
> > cmd/eficonfig.c | 69 +++++++++++++++++++++++++++++++++----------
> > cmd/eficonfig_sbkey.c | 18 +++++++++--
> > include/efi_config.h | 13 +++++++-
> > 3 files changed, 81 insertions(+), 19 deletions(-)
> >
> > diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c
> > index ce7175a566..39ee766a7b 100644
> > --- a/cmd/eficonfig.c
> > +++ b/cmd/eficonfig.c
> > @@ -21,6 +21,8 @@
> > #include <linux/delay.h>
> >
> > static struct efi_simple_text_input_protocol *cin;
> > +char eficonfig_menu_desc[] =
> > + " Press UP/DOWN to move, ENTER to select, ESC/CTRL+C to quit";
>
> Is this text supposed to change? If not we should define it as const
No, it should be defined as const. I will fix it.
Thanks,
Masahisa Kojima
>
> >
> > #define EFICONFIG_DESCRIPTION_MAX 32
> > #define EFICONFIG_OPTIONAL_DATA_MAX 64
> > @@ -133,7 +135,7 @@ void eficonfig_print_msg(char *msg)
> > *
> > * @data: pointer to the data associated with each menu entry
> > */
> > -static void eficonfig_print_entry(void *data)
> > +void eficonfig_print_entry(void *data)
> > {
> > struct eficonfig_entry *entry = data;
> > int reverse = (entry->efi_menu->active == entry->num);
> > @@ -160,7 +162,7 @@ static void eficonfig_print_entry(void *data)
> > *
> > * @m: pointer to the menu structure
> > */
> > -static void eficonfig_display_statusline(struct menu *m)
>
> [...]
>
> Thanks
> /Ilias
More information about the U-Boot
mailing list