Sebastian Herbszt
2009-Jun-13 18:36 UTC
[syslinux] menu system behaviour with empty config file
The behaviour of the menu system is odd when an empty / not existing config file is specified: the screen is cleared but not even the menu frame is displayed. It seems to be a problem with run_menu() from menumain.c: if (top != prev_top) { draw_menu(entry, top, 1); display_help(me->helptext); } else if (entry != prev_entry) { draw_row(prev_entry - top + 4 + VSHIFT, entry, top, 0, 0); draw_row(entry - top + 4 + VSHIFT, entry, top, 0, 0); display_help(me->helptext); } And we have entry = prev_entry = top = prev_top = -1. - Sebastian
H. Peter Anvin
2009-Jun-13 19:07 UTC
[syslinux] menu system behaviour with empty config file
Sebastian Herbszt wrote:> The behaviour of the menu system is odd when an empty / not existing > config file is specified: > the screen is cleared but not even the menu frame is displayed. > > It seems to be a problem with run_menu() from menumain.c: > > if (top != prev_top) { > draw_menu(entry, top, 1); > display_help(me->helptext); > } else if (entry != prev_entry) { > draw_row(prev_entry - top + 4 + VSHIFT, entry, top, 0, 0); > draw_row(entry - top + 4 + VSHIFT, entry, top, 0, 0); > display_help(me->helptext); > } > > And we have entry = prev_entry = top = prev_top = -1. >Yes, it's an error condition and probably should just cause the menu to exit (unless someone has a better idea.) -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.