[syslinux] Menu system bug - MENU DEFAULT not working

Tomas M tomas at slax.org
Thu Sep 6 12:26:46 PDT 2012


Yes I tested with unique label names. I tested with only 4 menus, so
it is not a problem of the limit.

What is strange, it starts working after a while for particular menu
item. For example, if I select (press Enter) on the second row several
times in one go, it starts to work and the 'cursor' then remains on
the second row (thus the menu default is correct). The same for any
other row, be it third or fourth.

It must be somewhere in the code.
I am no coder, it seems to me each submenu assigns the MENU DEFAULT
index value to its parent, and maybe syslinux is confuse because I
switch between the menus by GOTO.

Tomas M




On Thu, Sep 6, 2012 at 4:16 PM, Ady <ady-sf at hotmail.com> wrote:
>
> From:   Tomas M <tomas at slax.org>
> Date sent:      Thu, 6 Sep 2012 12:56:46 +0200
> To:     For discussion of Syslinux and tftp-hpa <syslinux at zytor.com>
> Subject:        [syslinux] Menu system bug - MENU DEFAULT not working
> Send reply to:  For discussion of Syslinux and tftp-hpa <syslinux at zytor.com>
>         <mailto:syslinux-request at zytor.com?subject=unsubscribe>
>         <mailto:syslinux-request at zytor.com?subject=subscribe>
>
>> Hello,
>> I'm reporting a bug, see attached syslinux.cfg
>>
>> I'm using submenu entries to emulate checkbox inputs.
>> The idea is simple, there are submenus generated for all possible cases,
>> and each Enter keypress loads appropriate submenu section.
>>
>> The logic of the menu is correct. Just syslinux has some bug.
>> It doesn't set MENU DEFAULT properly for all submenus.
>>
>> If your first Enter keypress is on OptionA, it will work.
>> However if your first Enter keypress is on OptionB for example,
>> it loads correct submenu (01001) but doesn't set the MENU DEFAULT
>> - in this submenu, menu default is set to second row, but syslinux
>> puts cursor on the first row.
>>
>>
>> Any ideas how to fix that?
>>
>> Thank you!
>>
>>
>> Tomas M
>> slax.org
>>
>
> I think first you might want to test if the problem is somehow
> related to the number of submenus. I think there was some limit, but
> I don't know if this is still an issue.
>
> The reason it works for the first option is because that's the
> default behavior when "MENU DEFAULT" is not used.
>
> Have you tried using correct unique labels? For example:
>
> MENU BEGIN 00000
>    MENU START
>    LABEL 00000_10000
>    MENU DEFAULT
>    MENU LABEL [ ] OptionA this=00000 next=10000
>    MENU GOTO 10000
>    LABEL 00000_01001
>    MENU LABEL [ ] OptionB this=00000 next=01001
>    MENU GOTO 01001
>    LABEL 00000_00102
>    MENU LABEL [ ] OptionC this=00000 next=00102
>    MENU GOTO 00102
>    LABEL 00000_00013
>    MENU LABEL [ ] OptionD this=00000 next=00013
>    MENU GOTO 00013
> MENU END
>
> ...
> ...
> ...
>
> MENU BEGIN 01001
>    LABEL 01001_11000
>    MENU LABEL [ ] OptionA this=01001 next=11000
>    MENU GOTO 11000
>    LABEL 01001_00001
>    MENU DEFAULT
>    MENU LABEL [*] OptionB this=01001 next=00001
>    MENU GOTO 00001
>    LABEL 01001_01102
>    MENU LABEL [ ] OptionC this=01001 next=01102
>    MENU GOTO 01102
>    LABEL 01001_01013
>    MENU LABEL [ ] OptionD this=01001 next=01013
>    MENU GOTO 01013
> MENU END
>
> Of course the above label "format" is just for the example, and you
> might want to use something different.
>
>
> _______________________________________________
> Syslinux mailing list
> Submissions to Syslinux at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux
> Please do not send private replies to mailing list traffic.
>



More information about the Syslinux mailing list