[syslinux] Menu system bug - MENU DEFAULT not working

Tomas M tomas at slax.org
Thu Oct 11 10:12:50 PDT 2012


The patches sent by Matt (for readconfig.c and menumain.c) indeed
resolve my issue! After applying, the menu system behaves exactly as
one would expect. Thank you.

In my opinion, applying those two patches should be called BUGFIX and
what it does is exactly that - if an user uses MENU DEFAULT then he
wants the particular entry to be _default_ when entering the menu! The
existing behavior, where the submenu goes back to previously selected
entry instead of switching to DEFAULT value is _in my opinion_ wrong
and NOT EXPECTED.

I vote for those patches to be applied to official syslinux releases.
If user wants submenu to start on any different menu then MENU
DEFAULT, then he should not use MENU DEFAULT ... that's it

Thank you

Tomas M
slax.org




On Thu, Oct 11, 2012 at 1:53 PM, Matt Fleming <matt at console-pimps.org> wrote:
> 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