[syslinux] No sub-menus in complex.c32

Murali (முரளி கணபதி) murali at google.com
Fri Jun 20 17:02:10 PDT 2008


On Fri, Jun 20, 2008 at 2:16 PM, H. Peter Anvin <hpa at zytor.com> wrote:
> Michael Madore wrote:
>> On Fri, Jun 20, 2008 at 3:26 PM, Sebastian Herbszt <herbszt at gmx.de> wrote:
>>> From: "Michael Madore" <michael.madore at gmail.com>
>>> Sent: Friday, June 20, 2008 5:08 AM
>>>> I commented out the call to fix_submenus() in menu/libmenu/menu.c and
>>>> now my menu works.  This is with 3.20, so I still have to try with
>>>> 3.63.  I haven't looked at fix_submenus() yet to see why it breaks
>>>> submenus.
>>> I think it breaks because fix_submenus calls find_menu_num which assumes
>>> a menu got a name. If add_menu is used name is NULL. It is not NULL if
>>> add_named_menu is used. complex.c is the only file using add_menu. All
>>> other files (simple.c, test.c and test2.c) are using add_named_menu.
>>
>> I converted all occurrences of add_menu to add_named_menu.  The
>> sub-menus now work, but radio button options are still broken.
>>
>
> I presume a way to hack around this would be to make add_menu a wrapper
> around add_named_menu assigning it an empty name or something like that?
>

It been some time, since I looked at the code. So what I say must be
taken with a pinch of salt.

Basically fix_submenus looks for menu's which have been declared by
name and tries to find their corresponding number. It assumes that if
you need a menu with name "foo", a menu with that name has been
defined else where.

Could you give a simple example.menu or example.c which demonstrates
the breakage?

Also the python based C code generator is an optional step for those
who prefer not to write C code (and was meant as an intermediate stage
before I could write a parser in C which parses the .menu file at run
time).

-- 
Murali

கற்றது கை மண் அளவு, கல்லாதது உலகளவு
(What we know is only a handful, what we dont is the rest of the world)


More information about the Syslinux mailing list