[syslinux] Menu system bug - MENU DEFAULT not working

Matt Fleming matt at console-pimps.org
Thu Oct 11 04:53:09 PDT 2012


On Thu, 2012-10-11 at 13:15 +0200, Ady wrote:
> If any patch affects older MENU DEFAULT behavior in submenus, it will 
> probably be in a positive way, as MENU DEFAULT combined with MENU 
> GOTO in submenus seems to be broken since before 4.00. I can still 
> see the broken behavior as you describe it, but IMHO making it work 
> with MENU GOTO seems more useful.

Well, the patch I posted today breaks the existing behaviour for any
default entry in a submenu, not just the MENU GOTO directive. I just
wanted to see if that is indeed the chunk of code that is causing the
issue Tomas is seeing.

Supporting the behaviour of not remembering the last selected entry
would be a new feature. If possible it would be great if Tomas could
handle the "sticky" menu entry in his config file generation tool.
Alternatively, we could invent a new MENU directive that means "Forget
the last selected entry if we leave this submenu".

> BTW...
> 
> In Changes in 3.72:
> 
>  "menu default" can now be specified after "menu begin", to
>  indicate that a specific submenu should be the default entry.
> 
> But in .doc/menu.txt:
> 
>  MENU DEFAULT (Only valid after a LABEL statement.)
>     Indicates that this entry should be the default for this 
> particular submenu.
> 
> So menu.txt and the changelog are stating 2 different things (read 
> them carefully).

I don't think these two are mutually exclusive. In Tomas' example config
files he has a MENU DEFAULT after both a MENU BEGIN directive and a
LABEL directive, which complies with the above statements.

Perhaps a clearer condition for doc/menu.txt would be,

   MENU DEFAULT (Must be preceded by a LABEL statement.)

I dunno. Patches welcome.

-- 
Matt Fleming, Intel Open Source Technology Center




More information about the Syslinux mailing list