2005-01-31 Marco Gerards <metgerards@student.han.nl>
* commands/help.c: New file. * normal/arg.c (show_help): Renamed to... (grub_arg_show_help): ... this. * commands/i386/pc/halt.c: New file. * commands/i386/pc/reboot.c: Likewise. * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'. (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'. (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES) (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New variables. * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `commands/help.c'. (pkgdata_MODULES): Add `help.mod'. (help_mod_SOURCES, help_mod_CFLAGS): New variables. * grub/i386/pc/init.h (grub_reboot): New prototype. (grub_halt): Likewise. * include/grub/normal.h (grub_arg_show_help): New prototype. (grub_help_init): Likewise. (grub_help_fini): Likewise. * util/grub-emu.c (main): Initialize and deinitialize the help command. * normal/cmdline.c (grub_cmdline_get): Doc fix. * normal/command.c (grub_command_init): Fixed the description of the `set' and `unset' commands.
This commit is contained in:
parent
0f79cdc1db
commit
990cf3aa8a
12 changed files with 326 additions and 15 deletions
|
@ -101,8 +101,8 @@ show_usage (grub_command_t cmd)
|
|||
grub_printf ("Usage: %s\n", cmd->summary);
|
||||
}
|
||||
|
||||
static void
|
||||
show_help (grub_command_t cmd)
|
||||
void
|
||||
grub_arg_show_help (grub_command_t cmd)
|
||||
{
|
||||
static void showargs (const struct grub_arg_option *opt)
|
||||
{
|
||||
|
@ -140,7 +140,7 @@ parse_option (grub_command_t cmd, int key, char *arg, struct grub_arg_list *usr)
|
|||
switch (key)
|
||||
{
|
||||
case 'h':
|
||||
show_help (cmd);
|
||||
grub_arg_show_help (cmd);
|
||||
return -1;
|
||||
|
||||
case 'u':
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1999,2000,2001,2002,2003,2004,2005 Free Software Foundation, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -459,7 +459,7 @@ grub_cmdline_run (int nested)
|
|||
|
||||
/* Get a command-line. If ECHO_CHAR is not zero, echo it instead of input
|
||||
characters. If READLINE is non-zero, readline-like key bindings are
|
||||
available. If ESC is pushed, return non-zero, otherwise return zero. */
|
||||
available. If ESC is pushed, return zero, otherwise return non-zero. */
|
||||
/* FIXME: The dumb interface is not supported yet. */
|
||||
int
|
||||
grub_cmdline_get (const char *prompt, char cmdline[], unsigned max_len,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2003, 2005 Free Software Foundation, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -316,10 +316,10 @@ grub_command_init (void)
|
|||
"rescue", "Enter into the rescue mode.", 0);
|
||||
|
||||
grub_register_command ("set", set_command, GRUB_COMMAND_FLAG_BOTH,
|
||||
"unset ENVVAR", "Set an environment variable.", 0);
|
||||
"set [ENVVAR=VALUE]", "Set an environment variable.", 0);
|
||||
|
||||
grub_register_command ("unset", unset_command, GRUB_COMMAND_FLAG_BOTH,
|
||||
"set [ENVVAR=VALUE]", "Remove an environment variable.", 0);
|
||||
"unset ENVVAR", "Remove an environment variable.", 0);
|
||||
|
||||
grub_register_command ("insmod", insmod_command, GRUB_COMMAND_FLAG_BOTH,
|
||||
"insmod MODULE|FILE", "Insert a module.", 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue