don't display menu when there's nothing in it
PATCH 1/1 don't display menu when there's nothing in it
normal.mod seems to insist in displaying a menu even if grub.cfg didn't define any menu entries. This seems to be due to a bogus check (for menu instead of menu->size).
Signature · 5 lines
Robert Millan <GPLv2> I know my rights; I want my phone call! <DRM> What use is a phone call… if you are unable to speak? (as seen on /.)
* normal/main.c (grub_normal_execute): Check for menu->size' rather than menu' when determining whether menu has to be displayed.
normal/main.c renamed from grub2/normal/main.c +1 -1
@@ -474,7 +474,7 @@ grub_normal_execute (const char *config, grub_errno =GRUB_ERR_NONE ; } -if (menu) +if (menu->size) {grub_menu_run (menu, nested);if (nested)
Quoted 3 lines · Robert Millan
normal.mod seems to insist in displaying a menu even if grub.cfg didn't define any menu entries. This seems to be due to a bogus check (for menu instead of
menu->size).
It is not completely bogus, since MENU can be NULL. Probably what you want is:
if (menu && menu->size)
Okuji
Quoted 8 lines · Yoshinori K. Okuji
Quoted 3 lines · Robert Millan
normal.mod seems to insist in displaying a menu even if grub.cfg didn't define any menu entries. This seems to be due to a bogus check (for menu instead of
menu->size).It is not completely bogus, since MENU can be NULL. Probably what you want is:
if (menu && menu->size)
Good catch. Committed.
Signature · 5 lines
Robert Millan <GPLv2> I know my rights; I want my phone call! <DRM> What use is a phone call… if you are unable to speak? (as seen on /.)