* [PATCH] don't display menu when there's nothing in it
@ 2008-02-01 20:02 Robert Millan
2008-02-02 12:20 ` Yoshinori K. Okuji
0 siblings, 1 reply; 3+ messages in thread
From: Robert Millan @ 2008-02-01 20:02 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 317 bytes --]
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).
--
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 /.)
[-- Attachment #2: non-menu.diff --]
[-- Type: text/x-diff, Size: 529 bytes --]
* normal/main.c (grub_normal_execute): Check for `menu->size' rather
than `menu' when determining whether menu has to be displayed.
diff -x CVS -x '*~' -x '*.mk' -urp ../grub2/normal/main.c ./normal/main.c
--- ../grub2/normal/main.c 2008-01-15 16:32:17.000000000 +0100
+++ ./normal/main.c 2008-02-01 20:58:56.000000000 +0100
@@ -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)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] don't display menu when there's nothing in it
2008-02-01 20:02 [PATCH] don't display menu when there's nothing in it Robert Millan
@ 2008-02-02 12:20 ` Yoshinori K. Okuji
2008-02-02 16:47 ` Robert Millan
0 siblings, 1 reply; 3+ messages in thread
From: Yoshinori K. Okuji @ 2008-02-02 12:20 UTC (permalink / raw)
To: The development of GRUB 2
On Friday 01 February 2008 21:02, Robert Millan wrote:
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] don't display menu when there's nothing in it
2008-02-02 12:20 ` Yoshinori K. Okuji
@ 2008-02-02 16:47 ` Robert Millan
0 siblings, 0 replies; 3+ messages in thread
From: Robert Millan @ 2008-02-02 16:47 UTC (permalink / raw)
To: The development of GRUB 2
On Sat, Feb 02, 2008 at 01:20:49PM +0100, Yoshinori K. Okuji wrote:
> On Friday 01 February 2008 21:02, Robert Millan wrote:
> > 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.
--
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 /.)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-02-02 16:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-01 20:02 [PATCH] don't display menu when there's nothing in it Robert Millan
2008-02-02 12:20 ` Yoshinori K. Okuji
2008-02-02 16:47 ` Robert Millan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.