[SeaBIOS] [PATCH] bootmenu: Skip wait for keypress with less than one item

Paul Menzel paulepanter at users.sourceforge.net
Tue Jun 24 22:48:22 CEST 2014


Dear Matt,


Am Dienstag, den 24.06.2014, 11:48 -0500 schrieb Matt DeVillier:
> Here's how I did it - this will skip the 'Press XXX for boot menu.' as
> well, so that there is no delay in booting, and no confusion on the
> user's part as to why the boot menu key isn't working :)

yes, much better than my patch! Thanks!

Could you please send the patch formatted with `git format-patch -s` so
your Signed-off-by line is added too?

> requires the file /etc/boot-auto to exist in the CBFS.
> 
>  diff --git a/src/boot.c b/src/boot.c
> index 133e206..bb5fd1f 100644
> --- a/src/boot.c
> +++ b/src/boot.c
> @@ -455,6 +455,12 @@ interactive_bootmenu(void)
>      if (! CONFIG_BOOTMENU || !romfile_loadint("etc/show-boot-menu", 1))
>          return;
>  
> +    //skip menu if only one boot device
> +    if ( NULL == BootList.first->next  && romfile_loadint("etc/boot-auto", 0) ) {

The logic seems to be reversed. The file content should be `1`,
shouldn’t it?

        … && romfile_loadint("etc/boot-auto", 1)

> +       printf("\n");
> +       return;
> +    }
> +
>      while (get_keystroke(0) >= 0)
>          ;

Also I wonder how I could achieve this without having to put that into
CBFS? I’d make that the default with

        !romfile_loadint("etc/boot-auto", 0)

or also add a Kconfig option `AUTO_BOOT` as is done for the boot menu.


Thanks,

Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://www.seabios.org/pipermail/seabios/attachments/20140624/cb89a639/attachment.asc>


More information about the SeaBIOS mailing list