[syslinux] Menu system bug - MENU DEFAULT not working

Ady ady-sf at hotmail.com
Thu Oct 11 06:30:18 PDT 2012


Subject:        	Re: [syslinux] Menu system bug - MENU DEFAULT not 
working
From:           	Matt Fleming <matt at console-pimps.org>
Date sent:      	Thu, 11 Oct 2012 12:53:09 +0100

> 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".
> 

But if I understood correctly, the previous behavior (remembering the 
last selection in the submenu) is only affecting someone getting out 
and back into a submenu, which is not something that a user would 
normally need to do.

On the other hand, MENU DEFAULT combined with MENU GOTO has a certain 
purpose, and it is not working as it should.

Having to add an additional directive in a cfg file just to make the 
combined 2 directives work as they originally should seems "too much" 
for this particular case.

I can't imagine someone "crying" about changing the mentioned 
behavior, but I can see a benefit if the behavior is "corrected".

BTW, other alternative methods of displaying (what could be seen 
almost as) "submenus" (by means of chain or config, for example), 
will not remember the previous selected entry. So what?

I don't see how "breaking" this specific behavior of remembering a 
previous selected entry in a submenu (while such entry is not the 
MENU DEFAULT one) would have some importance, but that's just me.

Summing it up: if there is no MENU DEFAULT defined in the submenu, 
then you might want to respect the old behavior of remembering the 
previous selection; BUT if MENU DEFAULT is indeed defined in the 
submenu, then it should be respected. In other words, the behavior 
should respect the MENU DEFAULT directive each and every time, so it 
should be corrected.



> > 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
> 
> 

I was not questioning so much the statement in menu.txt.

What I mean is that the changelog refers to a "submenu" (as in the 
entry in the parent menu that gets you into the submenu), not to a 
"specific _entry_ inside the submenu".

Let me purposely exaggerate the statement of the changelog so to make 
it more in accordance with the statement in menu.txt:

In Changes in 3.72 "should say" (exaggerated):

  "menu default" can now be specified inside a submenu too, so to 
indicate that a specific label entry inside a specific submenu should 
be the default selected entry among the entries in that specific 
submenu. Each submenu can have its own MENU DEFAULT entry.

If I'm still not being clear enough, just let me know.

Best Regards,
Ady.



More information about the Syslinux mailing list