[syslinux] No sub-menus in complex.c32
Murali (முரளி கணபதி)
murali at google.com
Sat Jun 21 00:17:38 PDT 2008
On Fri, Jun 20, 2008 at 5:29 PM, H. Peter Anvin <hpa at zytor.com> wrote:
> Murali (முரளி கணபதி) wrote:
>>
>> Could you give a simple example.menu or example.c which demonstrates
>> the breakage?
>>
>
> Apparently the currently in-tree complex.c breaks.
>
> -hpa
>
I think I have got the fix.
Michael, Andrew, could you apply the following patch to
menu/libmenu/menu.c and see if it works for you. With the change I
have got complex.c to work.
$ diff -u menu/libmenu/menu.c newmenu/libmenu/menu.c
--- menu/libmenu/menu.c 2008-04-10 10:30:35.000000000 -0700
+++ newmenu/libmenu/menu.c 2008-06-21 00:12:19.000000000 -0700
@@ -695,9 +695,9 @@
for (j=0; j < m->numitems; j++)
{
mi = m->items[j];
- // if submenu with non-trivial data string
- // again using hack that itemdata is a union data type
- if ( mi->data && ((mi->action == OPT_SUBMENU) || (mi->action
== OPT_RADIOMENU)) )
+ // if item is a submenu and has non-empty non-trivial data string
+ if ( mi->data && strlen(mi->data) > 0 &&
+ ((mi->action == OPT_SUBMENU) || (mi->action == OPT_RADIOMENU)) )
mi->itemdata.submenunum = find_menu_num (mi->data);
}
}
############ END OF DIFF OUTPUT ################
Sorry for any troubles caused.
--
Murali
கற்றது கை மண் அளவு, கல்லாதது உலகளவு
(What we know is only a handful, what we dont is the rest of the world)
More information about the Syslinux
mailing list