2005-08-14 Yoshinori K. Okuji <okuji@enbug.org>
* normal/menu.c (run_menu_entry): * normal/command.c (grub_command_execute): If INTERACTIVE is false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print CMDLINE. Disable the pager if INTERACTIVE is true. All callers are changed. * normal/main.c (grub_normal_execute): Read command.lst and fs.lst before reading a config file. * normal/main.c (read_config_file): Even if a command is not found, register it if it is within an entry. * util/grub-emu.c: Include sys/types.h and unistd.h. (options): Added --hold. (struct arguments): Added a new member "hold". (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is missing. (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is cleared by a debugger, if it is not zero. * include/grub/normal.h (grub_command_execute): Add an argument INTERACTIVE.
This commit is contained in:
parent
e51f85ae35
commit
0a74e62fde
8 changed files with 98 additions and 67 deletions
|
@ -319,34 +319,17 @@ run_menu_entry (grub_menu_entry_t entry)
|
|||
|
||||
for (cl = entry->command_list; cl != 0; cl = cl->next)
|
||||
{
|
||||
grub_command_t c;
|
||||
|
||||
if (cl->command[0] == '\0')
|
||||
/* Ignore an empty command line. */
|
||||
continue;
|
||||
|
||||
c = grub_command_find (cl->command);
|
||||
if (! c)
|
||||
break;
|
||||
|
||||
if (! (c->flags & GRUB_COMMAND_FLAG_CMDLINE))
|
||||
{
|
||||
grub_error (GRUB_ERR_INVALID_COMMAND,
|
||||
"invalid command `%s'",
|
||||
cl->command);
|
||||
break;
|
||||
}
|
||||
|
||||
if (! (c->flags & GRUB_COMMAND_FLAG_NO_ECHO))
|
||||
grub_printf ("%s\n", cl->command);
|
||||
|
||||
if (grub_command_execute (cl->command) != 0)
|
||||
if (grub_command_execute (cl->command, 0) != 0)
|
||||
break;
|
||||
}
|
||||
|
||||
if (grub_errno == GRUB_ERR_NONE && grub_loader_is_loaded ())
|
||||
/* Implicit execution of boot, only if something is loaded. */
|
||||
grub_command_execute ("boot");
|
||||
grub_command_execute ("boot", 0);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue