[PATCH] menu: Ignore prompt variable if timeout is != 0

FUKAUMI Naoki naoki at radxa.com
Wed Jul 19 05:20:28 CEST 2023


hi,

thank you for your reply!

On 7/18/23 23:08, Jonas Karlman wrote:
> On 2023-07-14 09:36, FUKAUMI Naoki wrote:
>> From: Manuel Traut <manuel.traut at mt.com>
>>
>> Since 739e8361f3fe78038251216df6096a32bc2d5839, a system with the following
>> /boot/extlinux/extlinux.conf (which sets timeout to 50) immediately boots the
>> first entry in the config without displaying a boot menu.  According to the
>> description, that should only happen if both prompt and timeout are set to zero
>> in the config, but it also happens with timeout set to a non-zero value.
>>
>> Reported-by: Karsten Merker <merker at debian.org>
>> Signed-off-by: Manuel Traut <manuel.traut at mt.com>
>> ---
>>   common/menu.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/common/menu.c b/common/menu.c
>> index 8fe00965c0..8eabcccc87 100644
>> --- a/common/menu.c
>> +++ b/common/menu.c
>> @@ -277,6 +277,9 @@ int menu_get_choice(struct menu *m, void **choice)
>>   	if (!m->item_cnt)
>>   		return -ENOENT;
>>   
>> +	if (m->timeout)
>> +		return menu_interactive_choice(m, choice);
> 
> This should not be needed, if the user wants to prompt the menu there is
> the PROMPT keyword that can be used in extlinux.conf, e.g.:
> 
>    PROMPT 1
>    TIMEOUT 50
> 
> See https://wiki.archlinux.org/title/Syslinux#Boot_prompt
> 
> That should set pxe cfg->prompt = 1 and that in turn menu m->prompt = 1.

  https://source.denx.de/u-boot/u-boot/-/blob/master/common/menu.c#L346-351

this description is unclear for me if (timeout > 0) && (prompt == 0)

Best regards,

--
FUKAUMI Naoki
Radxa

> Regards,
> Jonas
> 
>> +
>>   	if (!m->prompt)
>>   		return menu_default_choice(m, choice);
>>   


More information about the U-Boot mailing list