[syslinux] Menu system exit
Murali Krishnan Ganapathy
gmurali at cs.uchicago.edu
Fri May 21 09:55:41 PDT 2004
I think I know what is happenning. Whenever OPT_EXITMENU is selected,
the value of curr will be set to NULL. That explains the behaviour.
One way around is to replace the last add_item with
add_item("Exit this menu","Go back...",OPT_RUN,"mainmenu.com",0);
and then you dont need the "if curr->action == OPT_EXIT" line. While
this should work (I dont think PXELinux has anything to do with it),
the only difference you will see is the absence of (<< when the item is
being displayed).
If I come up with a cleaner solution, I will let you know.
- Murali
Aaron McSorley wrote:
>I cant get this to work, it still exits to the boot prompt.
>Does it make a difference that I'm using pxelinux?
>
>Here is the end of mymenu.c:
>
> add_item("Exit this menu","Go back to Main Menu",OPT_EXITMENU,"mainmenu.com",0);
>
> curr = showmenus(MAIN);
>
> if (curr)
> {
>
> if (curr->action == OPT_EXIT) runcommand(curr->data);
> if (curr->action == OPT_RUN)
> {
> if (syslinux) runcommand(curr->data);
> else csprint(curr->data,0x07);
> return 1;
> }
> csprint("Error in programming!",0x07);
> }
> return 0;
>
>
>I can run mainmenu.com from the boot prompt so, I know that works.
>
>Thanks for your help
> -Aaron
>
>On Thu, 20 May 2004, ganapathy murali krishnan wrote:
>
>
>
>>If you look at your mymenu.c, there is a line which goes like
>>
>>"if (curr->action ==OPT_EXIT) return 0"
>>
>>You could just replace it with
>>
>>if (curr->action == OPT_EXIT) runcommand(curr->data)
>>
>>where the curr->data has the name of .com file to execute.
>>
>>- Murali
>>
>>Aaron McSorley wrote:
>>
>>
>>
>>> I want to make a menu system consisting of multiple
>>>comboot menu files, how do tell the exit (ESC, Left Arrow) function
>>>to go to a menu file rather than the boot prompt.
>>>
>>>Thanks
>>>-Aaron
>>>
>>>
>>>
>>>
>
>
>_______________________________________________
>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