* grub-core/commands/menuentry.c (grub_cmd_menuentry): Correctly
handle class-free menuentries. (grub_normal_add_menu_entry): Add a check to be sure.
This commit is contained in:
parent
4c2a3b438e
commit
d4de6b01e8
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2011-05-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/commands/menuentry.c (grub_cmd_menuentry): Correctly
|
||||
handle class-free menuentries.
|
||||
(grub_normal_add_menu_entry): Add a check to be sure.
|
||||
|
||||
2011-05-14 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/term/at_keyboard.c (set1_e0_mapping): Fix swap between
|
||||
|
|
|
@ -91,7 +91,7 @@ grub_normal_add_menu_entry (int argc, const char **args, char **classes,
|
|||
if (! menu_sourcecode)
|
||||
return grub_errno;
|
||||
|
||||
if (classes)
|
||||
if (classes && classes[0])
|
||||
{
|
||||
int i;
|
||||
for (i = 0; classes[i]; i++); /* count # of menuentry classes */
|
||||
|
@ -255,7 +255,8 @@ grub_cmd_menuentry (grub_extcmd_context_t ctxt, int argc, char **args)
|
|||
|
||||
if (! ctxt->script)
|
||||
return grub_normal_add_menu_entry (argc, (const char **) args,
|
||||
ctxt->state[0].args, ctxt->state[1].arg,
|
||||
(ctxt->state[0].set ? ctxt->state[0].args
|
||||
: NULL), ctxt->state[1].arg,
|
||||
ctxt->state[2].arg, 0,
|
||||
ctxt->state[3].arg,
|
||||
ctxt->extcmd->cmd->name[0] == 's');
|
||||
|
|
Loading…
Reference in a new issue