[syslinux] SYSLINUX 2.09-pre5 - GFX Cleanup Glitches

Murali Krishnan Ganapathy gmurali at cs.uchicago.edu
Tue Feb 3 08:19:24 PST 2004


I did want to use memory allocation in my code, so I had to make a few 
assumptions.

1. There is a limit for the size of the longest entry in the menu.
2. There is a limit for the length of any status string.
3. There is a limit for the length of any action string.
4. The length of any menu title has also a limit.

In case for (2),(3) and (4) if you violate them, then it will silently 
replace "Your verrrrrrrrrrrryyyyyyyyyyyy loooooooongg item"
with "ITEM STRING TOO LONG" or "ACTION STRING TOO LONG" and so on.

To get around the limitations of (2),(3) and (4), just modify a few 
#defines in menu.h

However the bug you mentioned is still there. The modifications required 
in the code is in the code of  add_menu in menu.c.
Add the following line at the conclusion of the "if (title)"  condition:

------
char add_menu(const char *title) // Create a new menu and return its 
position
{
    char num = menusystem.nummenus;
     t_menu *m;

    if (num >= MAXMENUS) return -1;
    m = &(menusystem.menus[num]);
    m->numitems = 0;
    if (title)
    {
        if (strlen(title) > MENULEN - 2)
              dstrcpy(m->title," TITLE TOO LONG ");
        else dstrcpy(m->title,title);
    }
    else dstrcpy(m->title,"");
    m ->menuwidth = strlen(m->title);
    menusystem.nummenus += 1;
    return menusystem.nummenus - 1;
}
---------

I will make the change on my page, as soon as I reach office.

Thanks for pointing it out.

- Murali

Geoffrey Huntley wrote:

>Here's another possible bug with /menu.
>
>As before, it's against the unmoidief -pre5 snapshot.
>
>
>SRC: http://www.survivaldisk.com/menutest2.c
>COMPILED: http://www.survivaldisk.com/menutest2.com 
>
>A submenu with a large name when gone into will not 100% clean up and remove
>the menuname if you goto the previous menu.
>
>In my example I've got a submenu called:
>
>1234567890123456789012
>
>If I am to go into that submenu and then go back to the main menu
>
>It will clean up the screen all except for the last char
>
>i.e. 123456789012345678901 is removed from the screen and the end "2" is not
>and remains perm on the screen until the next comboot session.
>
>I'm at home right now so I'm unable to test under isolinux or pxelinux.
>
>These are the results I am getting within a cmd shell,
>
>-----Original Message-----
>From: syslinux-bounces at zytor.com [mailto:syslinux-bounces at zytor.com] On
>Behalf Of Geoffrey Huntley
>Sent: Tuesday, February 03, 2004 8:29 PM
>To: syslinux at zytor.com
>Subject: [syslinux] SYSLINUX 2.09-pre5 - Menu Depth "Feature"
>
>HPA, 
>	I believe I've found a possible bug with /menu.
>
>This against the unmodified -pre5 snapshot.
> 
>SRC: http://www.survivaldisk.com/menutest.c
>COMPILED: http://www.survivaldisk.com/menutest.com
>
>It's easiest explained if you just compile the .c and experience it for
>yourself, anyways.
>
>If you have two submenus nested within each other and then call a third menu
>it will bring up the second menu instead of the third.
>
>  MAIN = add_menu(" Main Menu ");
>  add_item("Begin Menu Depth Test","Only Allows Depth Of
>Two",OPT_SUBMENU,NULL,ONE);
>  add_item("Exit to prompt", "Exit the menu system", OPT_EXITMENU, "exit",
>0);
>
>  ONE = add_menu(" LEVEL 1 ");
>  add_item("GOTO LEVEL 2","Go one level up",OPT_SUBMENU,NULL,TWO);
>  add_item("Exit to prompt", "Exit the menu system", OPT_EXITMENU, "exit",
>0);
>
>  TWO = add_menu(" LEVEL 2 ");
>  add_item("GOTO LEVEL 3","Go one level up",OPT_SUBMENU,NULL,TWO);
>  add_item("Exit to prompt", "Exit the menu system", OPT_EXITMENU, "exit",
>0);
>  [snip]
>
>End result of selecting goto LEVEL 2 is that it brings up a new submenu
>containing LEVEL 1 instead of LEVEL2.
>
> 
>  
>
>>I have just released SYSLINUX 2.09-pre4 with a few changes:
>>
>>a) SYSLINUX should now correctly handle mode changes from within a 
>>COMBOOT program.
>>
>>b) Tweaks to the menu system to avoid the "grey text on black" problem.
>>
>>c) A new color scheme for the menu system (Murali, check it out and see 
>>if you think it works for you.)
>>
>>ftp://ftp.kernel.org/pub/linux/utils/boot/syslinux/Testing/
>>
>>Please test it out, everyone...
>>
>>	-hpa
>>    
>>
>
>  
>




More information about the Syslinux mailing list