2009-12-26 Carles Pina i Estany <carles@pina.cat>

* commands/help.c (grub_cmd_help): Print the command name before the
	summary.
	(GRUB_MOD_INIT): Remove command name from the summary.
	* kern/command.c (GRUB_MOD_INIT): If summary is null assign an empty
	strig as summary.
	* lib/arg.c (find_long): Print the command name before the summary.
	* commands/acpi.c (GRUB_MOD_INIT): Remove command name from the
	summary.
	* commands/blocklist.c (GRUB_MOD_INIT): Likewise.
	* commands/cat.c (GRUB_MOD_INIT): Likewise.
	* commands/cmp.c (GRUB_MOD_INIT): Likewise.
	* commands/configfile.c (GRUB_MOD_INIT): Likewise.
	* commands/crc.c (GRUB_MOD_INIT): Likewise.
	* commands/date.c (GRUB_MOD_INIT): Likewise.
	* commands/echo.c (GRUB_MOD_INIT): Likewise.
	* commands/efi/loadbios.c (GRUB_MOD_INIT): Likewise.
	* commands/gptsync.c (GRUB_MOD_INIT): Likewise.
	* commands/handler.c (GRUB_MOD_INIT): Likewise.
	* commands/hdparm.c (GRUB_MOD_INIT): Likewise.
	* commands/hexdump.c (GRUB_MOD_INIT): Likewise.
	* commands/i386/cpuid.c (GRUB_MOD_INIT): Likewise.
	* commands/i386/pc/halt.c (GRUB_MOD_INIT): Likewise.
	* commands/i386/pc/play.c (GRUB_MOD_INIT): Likewise.
	* commands/i386/pc/pxecmd.c (GRUB_MOD_INIT): Likewise.
	* commands/keystatus.c (GRUB_MOD_INIT): Likewise.
	* commands/loadenv.c (GRUB_MOD_INIT): Likewise.
	* commands/ls.c (GRUB_MOD_INIT): Likewise.
	* commands/lspci.c (GRUB_MOD_INIT): Likewise.
	* commands/memrw.c (GRUB_MOD_INIT): Likewise.
	* commands/minicmd.c (GRUB_MOD_INIT): Likewise.
	* commands/parttool.c (GRUB_MOD_INIT): Likewise.
	* commands/password.c (GRUB_MOD_INIT): Likewise.
	* commands/probe.c (GRUB_MOD_INIT): Likewise.
	* commands/read.c (GRUB_MOD_INIT): Likewise.
	* commands/search.c (GRUB_MOD_INIT): Likewise.
	* commands/sleep.c (GRUB_MOD_INIT): Likewise.
	* commands/test.c (GRUB_MOD_INIT): Likewise.
	* commands/xnu_uuid.c (GRUB_MOD_INIT): Likewise.
	* efiemu/main.c (GRUB_MOD_INIT): Likewise.
	* font/font_cmd.c (GRUB_MOD_INIT): Likewise.
	* gettext/gettext.c (GRUB_MOD_INIT): Likewise.
	* kern/corecmd.c (GRUB_MOD_INIT): Likewise.
	* lib/arg.c (GRUB_MOD_INIT): Likewise.
	* loader/efi/appleloader.c (GRUB_MOD_INIT): Likewise.
	* loader/i386/bsd.c (GRUB_MOD_INIT): Likewise.
	* loader/xnu.c (GRUB_MOD_INIT): Likewise.
	* mmap/mmap.c (GRUB_MOD_INIT): Likewise.
	* term/terminfo.c (GRUB_MOD_INIT): Likewise.
	* video/readers/jpeg.c (GRUB_MOD_INIT): Likewise.
	* video/readers/png.c (GRUB_MOD_INIT): Likewise.
	* video/readers/tga.c (GRUB_MOD_INIT): Likewise.
This commit is contained in:
carles 2009-12-26 00:50:59 +01:00
parent 9c288be27a
commit fdcdbb6633
47 changed files with 122 additions and 68 deletions

View File

@ -1,3 +1,57 @@
2009-12-26 Carles Pina i Estany <carles@pina.cat>
* commands/help.c (grub_cmd_help): Print the command name before the
summary.
(GRUB_MOD_INIT): Remove command name from the summary.
* kern/command.c (GRUB_MOD_INIT): If summary is null assign an empty
strig as summary.
* lib/arg.c (find_long): Print the command name before the summary.
* commands/acpi.c (GRUB_MOD_INIT): Remove command name from the
summary.
* commands/blocklist.c (GRUB_MOD_INIT): Likewise.
* commands/cat.c (GRUB_MOD_INIT): Likewise.
* commands/cmp.c (GRUB_MOD_INIT): Likewise.
* commands/configfile.c (GRUB_MOD_INIT): Likewise.
* commands/crc.c (GRUB_MOD_INIT): Likewise.
* commands/date.c (GRUB_MOD_INIT): Likewise.
* commands/echo.c (GRUB_MOD_INIT): Likewise.
* commands/efi/loadbios.c (GRUB_MOD_INIT): Likewise.
* commands/gptsync.c (GRUB_MOD_INIT): Likewise.
* commands/handler.c (GRUB_MOD_INIT): Likewise.
* commands/hdparm.c (GRUB_MOD_INIT): Likewise.
* commands/hexdump.c (GRUB_MOD_INIT): Likewise.
* commands/i386/cpuid.c (GRUB_MOD_INIT): Likewise.
* commands/i386/pc/halt.c (GRUB_MOD_INIT): Likewise.
* commands/i386/pc/play.c (GRUB_MOD_INIT): Likewise.
* commands/i386/pc/pxecmd.c (GRUB_MOD_INIT): Likewise.
* commands/keystatus.c (GRUB_MOD_INIT): Likewise.
* commands/loadenv.c (GRUB_MOD_INIT): Likewise.
* commands/ls.c (GRUB_MOD_INIT): Likewise.
* commands/lspci.c (GRUB_MOD_INIT): Likewise.
* commands/memrw.c (GRUB_MOD_INIT): Likewise.
* commands/minicmd.c (GRUB_MOD_INIT): Likewise.
* commands/parttool.c (GRUB_MOD_INIT): Likewise.
* commands/password.c (GRUB_MOD_INIT): Likewise.
* commands/probe.c (GRUB_MOD_INIT): Likewise.
* commands/read.c (GRUB_MOD_INIT): Likewise.
* commands/search.c (GRUB_MOD_INIT): Likewise.
* commands/sleep.c (GRUB_MOD_INIT): Likewise.
* commands/test.c (GRUB_MOD_INIT): Likewise.
* commands/xnu_uuid.c (GRUB_MOD_INIT): Likewise.
* efiemu/main.c (GRUB_MOD_INIT): Likewise.
* font/font_cmd.c (GRUB_MOD_INIT): Likewise.
* gettext/gettext.c (GRUB_MOD_INIT): Likewise.
* kern/corecmd.c (GRUB_MOD_INIT): Likewise.
* lib/arg.c (GRUB_MOD_INIT): Likewise.
* loader/efi/appleloader.c (GRUB_MOD_INIT): Likewise.
* loader/i386/bsd.c (GRUB_MOD_INIT): Likewise.
* loader/xnu.c (GRUB_MOD_INIT): Likewise.
* mmap/mmap.c (GRUB_MOD_INIT): Likewise.
* term/terminfo.c (GRUB_MOD_INIT): Likewise.
* video/readers/jpeg.c (GRUB_MOD_INIT): Likewise.
* video/readers/png.c (GRUB_MOD_INIT): Likewise.
* video/readers/tga.c (GRUB_MOD_INIT): Likewise.
2009-12-25 Vladimir Serbinenko <phcoder@gmail.com> 2009-12-25 Vladimir Serbinenko <phcoder@gmail.com>
Use search command for preliminar UUID search. Use search command for preliminar UUID search.

View File

@ -759,7 +759,7 @@ GRUB_MOD_INIT(acpi)
{ {
cmd = grub_register_extcmd ("acpi", grub_cmd_acpi, cmd = grub_register_extcmd ("acpi", grub_cmd_acpi,
GRUB_COMMAND_FLAG_BOTH, GRUB_COMMAND_FLAG_BOTH,
"acpi [-1|-2] [--exclude=table1,table2|" "[-1|-2] [--exclude=table1,table2|"
"--load-only=table1,table2] filename1 " "--load-only=table1,table2] filename1 "
" [filename2] [...]", " [filename2] [...]",
"Load host acpi tables and tables " "Load host acpi tables and tables "

View File

@ -110,7 +110,7 @@ static grub_command_t cmd;
GRUB_MOD_INIT(blocklist) GRUB_MOD_INIT(blocklist)
{ {
cmd = grub_register_command ("blocklist", grub_cmd_blocklist, cmd = grub_register_command ("blocklist", grub_cmd_blocklist,
"blocklist FILE", "Print a block list."); "FILE", "Print a block list.");
} }
GRUB_MOD_FINI(blocklist) GRUB_MOD_FINI(blocklist)

View File

@ -78,7 +78,7 @@ static grub_command_t cmd;
GRUB_MOD_INIT(cat) GRUB_MOD_INIT(cat)
{ {
cmd = grub_register_command_p1 ("cat", grub_cmd_cat, cmd = grub_register_command_p1 ("cat", grub_cmd_cat,
"cat FILE", "Show the contents of a file."); "FILE", "Show the contents of a file.");
} }
GRUB_MOD_FINI(cat) GRUB_MOD_FINI(cat)

View File

@ -109,7 +109,7 @@ static grub_command_t cmd;
GRUB_MOD_INIT(cmp) GRUB_MOD_INIT(cmp)
{ {
cmd = grub_register_command ("cmp", grub_cmd_cmp, cmd = grub_register_command ("cmp", grub_cmd_cmp,
"cmp FILE1 FILE2", "Compare two files."); "FILE1 FILE2", "Compare two files.");
} }
GRUB_MOD_FINI(cmp) GRUB_MOD_FINI(cmp)

View File

@ -53,15 +53,15 @@ GRUB_MOD_INIT(configfile)
{ {
cmd_configfile = cmd_configfile =
grub_register_command ("configfile", grub_cmd_source, grub_register_command ("configfile", grub_cmd_source,
"configfile FILE", "Load another config file."); "FILE", "Load another config file.");
cmd_source = cmd_source =
grub_register_command ("source", grub_cmd_source, grub_register_command ("source", grub_cmd_source,
"source FILE", "FILE",
"Load another config file without changing context." "Load another config file without changing context."
); );
cmd_dot = cmd_dot =
grub_register_command (".", grub_cmd_source, grub_register_command (".", grub_cmd_source,
". FILE", "FILE",
"Load another config file without changing context." "Load another config file without changing context."
); );
} }

View File

@ -57,7 +57,7 @@ static grub_command_t cmd;
GRUB_MOD_INIT(crc) GRUB_MOD_INIT(crc)
{ {
cmd = grub_register_command ("crc", grub_cmd_crc, cmd = grub_register_command ("crc", grub_cmd_crc,
"crc FILE", "FILE",
"Calculate the crc32 checksum of a file."); "Calculate the crc32 checksum of a file.");
} }

View File

@ -135,7 +135,7 @@ GRUB_MOD_INIT(date)
{ {
cmd = cmd =
grub_register_command ("date", grub_cmd_date, grub_register_command ("date", grub_cmd_date,
"date [[year-]month-day] [hour:minute[:second]]", "[[year-]month-day] [hour:minute[:second]]",
"Command to display/set current datetime."); "Command to display/set current datetime.");
} }

View File

@ -113,7 +113,7 @@ static grub_extcmd_t cmd;
GRUB_MOD_INIT(echo) GRUB_MOD_INIT(echo)
{ {
cmd = grub_register_extcmd ("echo", grub_cmd_echo, GRUB_COMMAND_FLAG_BOTH, cmd = grub_register_extcmd ("echo", grub_cmd_echo, GRUB_COMMAND_FLAG_BOTH,
"echo [-e|-n] STRING", "Display a line of text.", "[-e|-n] STRING", "Display a line of text.",
options); options);
} }

View File

@ -204,7 +204,7 @@ GRUB_MOD_INIT(loadbios)
0, "Fake bios."); 0, "Fake bios.");
cmd_loadbios = grub_register_command ("loadbios", grub_cmd_loadbios, cmd_loadbios = grub_register_command ("loadbios", grub_cmd_loadbios,
"loadbios BIOS_DUMP [INT10_DUMP]", "BIOS_DUMP [INT10_DUMP]",
"Load bios dump."); "Load bios dump.");
} }

View File

@ -240,7 +240,7 @@ GRUB_MOD_INIT(gptsync)
{ {
(void) mod; /* To stop warning. */ (void) mod; /* To stop warning. */
cmd = grub_register_command ("gptsync", grub_cmd_gptsync, cmd = grub_register_command ("gptsync", grub_cmd_gptsync,
"gptsync DEVICE [PARTITION[+/-[TYPE]]] ...", "DEVICE [PARTITION[+/-[TYPE]]] ...",
"Fill hybrid MBR of GPT drive DEVICE. " "Fill hybrid MBR of GPT drive DEVICE. "
"specified partitions will be a part " "specified partitions will be a part "
"of hybrid mbr. Up to 3 partitions are " "of hybrid mbr. Up to 3 partitions are "

View File

@ -95,15 +95,15 @@ GRUB_MOD_INIT(handler)
{ {
cmd_handler = cmd_handler =
grub_register_command ("handler", grub_cmd_handler, grub_register_command ("handler", grub_cmd_handler,
"handler [class [handler]]", "[class [handler]]",
"List or select a handler."); "List or select a handler.");
cmd_terminal_input = cmd_terminal_input =
grub_register_command ("terminal_input", grub_cmd_handler, grub_register_command ("terminal_input", grub_cmd_handler,
"terminal_input [handler]", "[handler]",
"List or select an input terminal."); "List or select an input terminal.");
cmd_terminal_output = cmd_terminal_output =
grub_register_command ("terminal_output", grub_cmd_handler, grub_register_command ("terminal_output", grub_cmd_handler,
"terminal_output [handler]", "[handler]",
"List or select an output terminal."); "List or select an output terminal.");
} }

View File

@ -410,7 +410,7 @@ GRUB_MOD_INIT(hdparm)
{ {
cmd = grub_register_extcmd ("hdparm", grub_cmd_hdparm, cmd = grub_register_extcmd ("hdparm", grub_cmd_hdparm,
GRUB_COMMAND_FLAG_BOTH, GRUB_COMMAND_FLAG_BOTH,
"hdparm [OPTIONS] DISK", "[OPTIONS] DISK",
"Get/set ATA disk parameters.", options); "Get/set ATA disk parameters.", options);
} }

View File

@ -67,7 +67,7 @@ grub_cmd_help (grub_extcmd_t ext __attribute__ ((unused)), int argc,
if (cmd->flags & GRUB_COMMAND_FLAG_EXTCMD) if (cmd->flags & GRUB_COMMAND_FLAG_EXTCMD)
grub_arg_show_help ((grub_extcmd_t) cmd->data); grub_arg_show_help ((grub_extcmd_t) cmd->data);
else else
grub_printf ("%s %s\n%s\b", _("Usage:"), _(cmd->summary), grub_printf ("%s %s %s\n%s\b", _("Usage:"), cmd->name, _(cmd->summary),
_(cmd->description)); _(cmd->description));
} }
} }
@ -96,7 +96,7 @@ GRUB_MOD_INIT(help)
{ {
cmd = grub_register_extcmd ("help", grub_cmd_help, cmd = grub_register_extcmd ("help", grub_cmd_help,
GRUB_COMMAND_FLAG_CMDLINE, GRUB_COMMAND_FLAG_CMDLINE,
N_("help [PATTERN ...]"), N_("[PATTERN ...]"),
N_("Show a help message."), 0); N_("Show a help message."), 0);
} }

View File

@ -121,7 +121,7 @@ GRUB_MOD_INIT (hexdump)
{ {
cmd = grub_register_extcmd ("hexdump", grub_cmd_hexdump, cmd = grub_register_extcmd ("hexdump", grub_cmd_hexdump,
GRUB_COMMAND_FLAG_BOTH, GRUB_COMMAND_FLAG_BOTH,
"hexdump [OPTIONS] FILE_OR_DEVICE", "[OPTIONS] FILE_OR_DEVICE",
"Dump the contents of a file or memory.", "Dump the contents of a file or memory.",
options); options);
} }

View File

@ -88,7 +88,7 @@ done:
#endif #endif
cmd = grub_register_extcmd ("cpuid", grub_cmd_cpuid, GRUB_COMMAND_FLAG_BOTH, cmd = grub_register_extcmd ("cpuid", grub_cmd_cpuid, GRUB_COMMAND_FLAG_BOTH,
"cpuid [-l]", "Check for CPU features.", options); "[-l]", "Check for CPU features.", options);
} }
GRUB_MOD_FINI(cpuid) GRUB_MOD_FINI(cpuid)

View File

@ -46,7 +46,7 @@ static grub_extcmd_t cmd;
GRUB_MOD_INIT(halt) GRUB_MOD_INIT(halt)
{ {
cmd = grub_register_extcmd ("halt", grub_cmd_halt, GRUB_COMMAND_FLAG_BOTH, cmd = grub_register_extcmd ("halt", grub_cmd_halt, GRUB_COMMAND_FLAG_BOTH,
"halt [-n]", "[-n]",
"Halt the system, if possible using APM.", "Halt the system, if possible using APM.",
options); options);
} }

View File

@ -208,7 +208,7 @@ static grub_command_t cmd;
GRUB_MOD_INIT(play) GRUB_MOD_INIT(play)
{ {
cmd = grub_register_command ("play", grub_cmd_play, cmd = grub_register_command ("play", grub_cmd_play,
N_("play FILE"), N_("Play a tune.")); N_("FILE"), N_("Play a tune."));
} }
GRUB_MOD_FINI(play) GRUB_MOD_FINI(play)

View File

@ -41,7 +41,7 @@ static grub_command_t cmd;
GRUB_MOD_INIT(pxecmd) GRUB_MOD_INIT(pxecmd)
{ {
cmd = grub_register_command ("pxe_unload", grub_cmd_pxe_unload, cmd = grub_register_command ("pxe_unload", grub_cmd_pxe_unload,
"pxe_unload", 0,
"Unload PXE environment."); "Unload PXE environment.");
} }

View File

@ -70,7 +70,7 @@ GRUB_MOD_INIT(keystatus)
{ {
cmd = grub_register_extcmd ("keystatus", grub_cmd_keystatus, cmd = grub_register_extcmd ("keystatus", grub_cmd_keystatus,
GRUB_COMMAND_FLAG_BOTH, GRUB_COMMAND_FLAG_BOTH,
"keystatus [--shift] [--ctrl] [--alt]", "[--shift] [--ctrl] [--alt]",
"Check key modifier status.", "Check key modifier status.",
options); options);
} }

View File

@ -396,7 +396,7 @@ GRUB_MOD_INIT(loadenv)
cmd_save = cmd_save =
grub_register_extcmd ("save_env", grub_cmd_save_env, grub_register_extcmd ("save_env", grub_cmd_save_env,
GRUB_COMMAND_FLAG_BOTH, GRUB_COMMAND_FLAG_BOTH,
"save_env [-f FILE] variable_name [...]", "[-f FILE] variable_name [...]",
"Save variables to environment block file.", "Save variables to environment block file.",
options); options);
} }

View File

@ -260,7 +260,7 @@ static grub_extcmd_t cmd;
GRUB_MOD_INIT(ls) GRUB_MOD_INIT(ls)
{ {
cmd = grub_register_extcmd ("ls", grub_cmd_ls, GRUB_COMMAND_FLAG_BOTH, cmd = grub_register_extcmd ("ls", grub_cmd_ls, GRUB_COMMAND_FLAG_BOTH,
"ls [-l|-h|-a] [FILE]", "[-l|-h|-a] [FILE]",
"List devices and files.", options); "List devices and files.", options);
} }

View File

@ -218,7 +218,7 @@ static grub_extcmd_t cmd;
GRUB_MOD_INIT(lspci) GRUB_MOD_INIT(lspci)
{ {
cmd = grub_register_extcmd ("lspci", grub_cmd_lspci, GRUB_COMMAND_FLAG_BOTH, cmd = grub_register_extcmd ("lspci", grub_cmd_lspci, GRUB_COMMAND_FLAG_BOTH,
"lspci [-i]", "List PCI devices.", options); "[-i]", "List PCI devices.", options);
} }
GRUB_MOD_FINI(lspci) GRUB_MOD_FINI(lspci)

View File

@ -119,22 +119,22 @@ GRUB_MOD_INIT(memrw)
{ {
cmd_read_byte = cmd_read_byte =
grub_register_extcmd ("read_byte", grub_cmd_read, GRUB_COMMAND_FLAG_BOTH, grub_register_extcmd ("read_byte", grub_cmd_read, GRUB_COMMAND_FLAG_BOTH,
"read_byte ADDR", "Read byte from ADDR.", options); "ADDR", "Read byte from ADDR.", options);
cmd_read_word = cmd_read_word =
grub_register_extcmd ("read_word", grub_cmd_read, GRUB_COMMAND_FLAG_BOTH, grub_register_extcmd ("read_word", grub_cmd_read, GRUB_COMMAND_FLAG_BOTH,
"read_word ADDR", "Read word from ADDR.", options); "ADDR", "Read word from ADDR.", options);
cmd_read_dword = cmd_read_dword =
grub_register_extcmd ("read_dword", grub_cmd_read, GRUB_COMMAND_FLAG_BOTH, grub_register_extcmd ("read_dword", grub_cmd_read, GRUB_COMMAND_FLAG_BOTH,
"read_dword ADDR", "Read dword from ADDR.", options); "ADDR", "Read dword from ADDR.", options);
cmd_write_byte = cmd_write_byte =
grub_register_command ("write_byte", grub_cmd_write, grub_register_command ("write_byte", grub_cmd_write,
"write_byte ADDR VALUE [MASK]", "Write byte VALUE to ADDR."); "ADDR VALUE [MASK]", "Write byte VALUE to ADDR.");
cmd_write_word = cmd_write_word =
grub_register_command ("write_word", grub_cmd_write, grub_register_command ("write_word", grub_cmd_write,
"write_word ADDR VALUE [MASK]", "Write word VALUE to ADDR."); "ADDR VALUE [MASK]", "Write word VALUE to ADDR.");
cmd_write_dword = cmd_write_dword =
grub_register_command ("write_dword", grub_cmd_write, grub_register_command ("write_dword", grub_cmd_write,
"write_dword ADDR VALUE [MASK]", "Write dword VALUE to ADDR."); "ADDR VALUE [MASK]", "Write dword VALUE to ADDR.");
} }
GRUB_MOD_FINI(memrw) GRUB_MOD_FINI(memrw)

View File

@ -354,19 +354,19 @@ GRUB_MOD_INIT(minicmd)
{ {
cmd_cat = cmd_cat =
grub_register_command ("cat", grub_mini_cmd_cat, grub_register_command ("cat", grub_mini_cmd_cat,
"cat FILE", "Show the contents of a file."); "FILE", "Show the contents of a file.");
cmd_help = cmd_help =
grub_register_command ("help", grub_mini_cmd_help, grub_register_command ("help", grub_mini_cmd_help,
0, "Show this message."); 0, "Show this message.");
cmd_root = cmd_root =
grub_register_command ("root", grub_mini_cmd_root, grub_register_command ("root", grub_mini_cmd_root,
"root [DEVICE]", "Set the root device."); "[DEVICE]", "Set the root device.");
cmd_dump = cmd_dump =
grub_register_command ("dump", grub_mini_cmd_dump, grub_register_command ("dump", grub_mini_cmd_dump,
"dump ADDR", "Dump memory."); "ADDR", "Dump memory.");
cmd_rmmod = cmd_rmmod =
grub_register_command ("rmmod", grub_mini_cmd_rmmod, grub_register_command ("rmmod", grub_mini_cmd_rmmod,
"rmmod MODULE", "Remove a module."); "MODULE", "Remove a module.");
cmd_lsmod = cmd_lsmod =
grub_register_command ("lsmod", grub_mini_cmd_lsmod, grub_register_command ("lsmod", grub_mini_cmd_lsmod,
0, "Show loaded modules."); 0, "Show loaded modules.");

View File

@ -322,7 +322,7 @@ GRUB_MOD_INIT(parttool)
{ {
mymod = mod; mymod = mod;
cmd = grub_register_command ("parttool", grub_cmd_parttool, cmd = grub_register_command ("parttool", grub_cmd_parttool,
"parttool PARTITION COMMANDS", "PARTITION COMMANDS",
helpmsg); helpmsg);
} }

View File

@ -75,7 +75,7 @@ GRUB_MOD_INIT(password)
{ {
my_mod = mod; my_mod = mod;
cmd = grub_register_command ("password", grub_cmd_password, cmd = grub_register_command ("password", grub_cmd_password,
"password USER PASSWORD", "USER PASSWORD",
"Set user password (plaintext). " "Set user password (plaintext). "
"Unrecommended and insecure."); "Unrecommended and insecure.");
} }

View File

@ -150,7 +150,7 @@ static grub_extcmd_t cmd;
GRUB_MOD_INIT (probe) GRUB_MOD_INIT (probe)
{ {
cmd = grub_register_extcmd ("probe", grub_cmd_probe, GRUB_COMMAND_FLAG_BOTH, cmd = grub_register_extcmd ("probe", grub_cmd_probe, GRUB_COMMAND_FLAG_BOTH,
"probe [DEVICE]", "[DEVICE]",
"Retrieve device info.", options); "Retrieve device info.", options);
} }

View File

@ -79,7 +79,7 @@ static grub_command_t cmd;
GRUB_MOD_INIT(read) GRUB_MOD_INIT(read)
{ {
cmd = grub_register_command ("read", grub_cmd_read, cmd = grub_register_command ("read", grub_cmd_read,
"read [ENVVAR]", "[ENVVAR]",
"Set variable with user input."); "Set variable with user input.");
} }

View File

@ -165,7 +165,7 @@ GRUB_MOD_INIT(search_fs_label)
{ {
cmd = cmd =
grub_register_command (COMMAND_NAME, grub_cmd_do_search, grub_register_command (COMMAND_NAME, grub_cmd_do_search,
COMMAND_NAME " NAME [VARIABLE]", "NAME [VARIABLE]",
"Search devices by " SEARCH_TARGET "." "Search devices by " SEARCH_TARGET "."
" If VARIABLE is specified, " " If VARIABLE is specified, "
"the first device found is set to a variable."); "the first device found is set to a variable.");

View File

@ -105,7 +105,7 @@ static grub_extcmd_t cmd;
GRUB_MOD_INIT(sleep) GRUB_MOD_INIT(sleep)
{ {
cmd = grub_register_extcmd ("sleep", grub_cmd_sleep, GRUB_COMMAND_FLAG_BOTH, cmd = grub_register_extcmd ("sleep", grub_cmd_sleep, GRUB_COMMAND_FLAG_BOTH,
"sleep NUMBER_OF_SECONDS", "NUMBER_OF_SECONDS",
"Wait for a specified number of seconds.", "Wait for a specified number of seconds.",
options); options);
} }

View File

@ -420,9 +420,9 @@ static grub_command_t cmd_1, cmd_2;
GRUB_MOD_INIT(test) GRUB_MOD_INIT(test)
{ {
cmd_1 = grub_register_command ("[", grub_cmd_test, cmd_1 = grub_register_command ("[", grub_cmd_test,
"[ EXPRESSION ]", "Evaluate an expression."); "EXPRESSION ]", "Evaluate an expression.");
cmd_2 = grub_register_command ("test", grub_cmd_test, cmd_2 = grub_register_command ("test", grub_cmd_test,
"test EXPRESSION", "Evaluate an expression."); "EXPRESSION", "Evaluate an expression.");
} }
GRUB_MOD_FINI(test) GRUB_MOD_FINI(test)

View File

@ -377,7 +377,7 @@ static grub_command_t cmd;
GRUB_MOD_INIT (xnu_uuid) GRUB_MOD_INIT (xnu_uuid)
{ {
cmd = grub_register_command ("xnu_uuid", grub_cmd_xnu_uuid, cmd = grub_register_command ("xnu_uuid", grub_cmd_xnu_uuid,
"xnu_uuid GRUBUUID [VARNAME]", "GRUBUUID [VARNAME]",
"Transform 64-bit UUID to format " "Transform 64-bit UUID to format "
"suitable for xnu."); "suitable for xnu.");
} }

View File

@ -328,14 +328,14 @@ GRUB_MOD_INIT(efiemu)
{ {
cmd_loadcore = grub_register_command ("efiemu_loadcore", cmd_loadcore = grub_register_command ("efiemu_loadcore",
grub_cmd_efiemu_load, grub_cmd_efiemu_load,
"efiemu_loadcore FILE", "FILE",
"Load and initialize EFI emulator"); "Load and initialize EFI emulator");
cmd_prepare = grub_register_command ("efiemu_prepare", cmd_prepare = grub_register_command ("efiemu_prepare",
grub_cmd_efiemu_prepare, grub_cmd_efiemu_prepare,
"efiemu_prepare", 0,
"Finalize loading of EFI emulator"); "Finalize loading of EFI emulator");
cmd_unload = grub_register_command ("efiemu_unload", grub_cmd_efiemu_unload, cmd_unload = grub_register_command ("efiemu_unload", grub_cmd_efiemu_unload,
"efiemu_unload", 0,
"Unload EFI emulator"); "Unload EFI emulator");
} }

View File

@ -62,7 +62,7 @@ GRUB_MOD_INIT(font_manager)
cmd_loadfont = cmd_loadfont =
grub_register_command ("loadfont", loadfont_command, grub_register_command ("loadfont", loadfont_command,
"loadfont FILE...", "FILE...",
"Specify one or more font files to load."); "Specify one or more font files to load.");
cmd_lsfonts = cmd_lsfonts =
grub_register_command ("lsfonts", lsfonts_command, grub_register_command ("lsfonts", lsfonts_command,

View File

@ -347,7 +347,7 @@ GRUB_MOD_INIT (gettext)
grub_gettext_init_ext (lang); grub_gettext_init_ext (lang);
grub_register_command_p1 ("gettext", grub_cmd_translate, grub_register_command_p1 ("gettext", grub_cmd_translate,
"gettext STRING", "STRING",
"Translates the string with the current settings."); "Translates the string with the current settings.");
/* Reload .mo file information if lang changes. */ /* Reload .mo file information if lang changes. */

View File

@ -37,7 +37,7 @@ grub_register_command_prio (const char *name,
cmd->name = name; cmd->name = name;
cmd->func = func; cmd->func = func;
cmd->summary = (summary) ? summary : name; cmd->summary = (summary) ? summary : "";
cmd->description = description; cmd->description = description;
cmd->flags = GRUB_COMMAND_FLAG_BOTH; cmd->flags = GRUB_COMMAND_FLAG_BOTH;

View File

@ -190,13 +190,13 @@ void
grub_register_core_commands (void) grub_register_core_commands (void)
{ {
grub_register_command ("set", grub_core_cmd_set, grub_register_command ("set", grub_core_cmd_set,
"set [ENVVAR=VALUE]", "set an environment variable"); "[ENVVAR=VALUE]", "set an environment variable");
grub_register_command ("unset", grub_core_cmd_unset, grub_register_command ("unset", grub_core_cmd_unset,
"unset ENVVAR", "remove an environment variable"); "ENVVAR", "remove an environment variable");
grub_register_command ("export", grub_core_cmd_export, grub_register_command ("export", grub_core_cmd_export,
"export ENVVAR", "Export a variable."); "ENVVAR", "Export a variable.");
grub_register_command ("ls", grub_core_cmd_ls, grub_register_command ("ls", grub_core_cmd_ls,
"ls [ARG]", "list devices or files"); "[ARG]", "list devices or files");
grub_register_command ("insmod", grub_core_cmd_insmod, grub_register_command ("insmod", grub_core_cmd_insmod,
"insmod MODULE", "insert a module"); "MODULE", "insert a module");
} }

View File

@ -107,7 +107,7 @@ find_long (const struct grub_arg_option *options, const char *s, int len)
static void static void
show_usage (grub_extcmd_t cmd) show_usage (grub_extcmd_t cmd)
{ {
grub_printf ("%s %s\n", _("Usage:"), _(cmd->cmd->summary)); grub_printf ("%s %s %s\n", _("Usage:"), cmd->cmd->name, _(cmd->cmd->summary));
} }
void void

View File

@ -208,7 +208,7 @@ static grub_command_t cmd;
GRUB_MOD_INIT(appleloader) GRUB_MOD_INIT(appleloader)
{ {
cmd = grub_register_command ("appleloader", grub_cmd_appleloader, cmd = grub_register_command ("appleloader", grub_cmd_appleloader,
"appleloader [OPTS]", "Boot legacy system."); "[OPTS]", "Boot legacy system.");
my_mod = mod; my_mod = mod;
} }

View File

@ -1280,15 +1280,15 @@ GRUB_MOD_INIT (bsd)
{ {
cmd_freebsd = grub_register_extcmd ("kfreebsd", grub_cmd_freebsd, cmd_freebsd = grub_register_extcmd ("kfreebsd", grub_cmd_freebsd,
GRUB_COMMAND_FLAG_BOTH, GRUB_COMMAND_FLAG_BOTH,
"kfreebsd FILE", "Load kernel of FreeBSD.", "FILE", "Load kernel of FreeBSD.",
freebsd_opts); freebsd_opts);
cmd_openbsd = grub_register_extcmd ("kopenbsd", grub_cmd_openbsd, cmd_openbsd = grub_register_extcmd ("kopenbsd", grub_cmd_openbsd,
GRUB_COMMAND_FLAG_BOTH, GRUB_COMMAND_FLAG_BOTH,
"kopenbsd FILE", "Load kernel of OpenBSD.", "FILE", "Load kernel of OpenBSD.",
openbsd_opts); openbsd_opts);
cmd_netbsd = grub_register_extcmd ("knetbsd", grub_cmd_netbsd, cmd_netbsd = grub_register_extcmd ("knetbsd", grub_cmd_netbsd,
GRUB_COMMAND_FLAG_BOTH, GRUB_COMMAND_FLAG_BOTH,
"knetbsd FILE", "Load kernel of NetBSD.", "FILE", "Load kernel of NetBSD.",
netbsd_opts); netbsd_opts);
cmd_freebsd_loadenv = cmd_freebsd_loadenv =
grub_register_command ("kfreebsd_loadenv", grub_cmd_freebsd_loadenv, grub_register_command ("kfreebsd_loadenv", grub_cmd_freebsd_loadenv,

View File

@ -1412,7 +1412,7 @@ GRUB_MOD_INIT(xnu)
cmd_kext = grub_register_command ("xnu_kext", grub_cmd_xnu_kext, 0, cmd_kext = grub_register_command ("xnu_kext", grub_cmd_xnu_kext, 0,
"Load XNU extension."); "Load XNU extension.");
cmd_kextdir = grub_register_command ("xnu_kextdir", grub_cmd_xnu_kextdir, cmd_kextdir = grub_register_command ("xnu_kextdir", grub_cmd_xnu_kextdir,
"xnu_kextdir DIRECTORY [OSBundleRequired]", "DIRECTORY [OSBundleRequired]",
"Load XNU extension directory"); "Load XNU extension directory");
cmd_ramdisk = grub_register_command ("xnu_ramdisk", grub_cmd_xnu_ramdisk, 0, cmd_ramdisk = grub_register_command ("xnu_ramdisk", grub_cmd_xnu_ramdisk, 0,
"Load XNU ramdisk. " "Load XNU ramdisk. "

View File

@ -414,7 +414,7 @@ static grub_command_t cmd;
GRUB_MOD_INIT(mmap) GRUB_MOD_INIT(mmap)
{ {
cmd = grub_register_command ("badram", grub_cmd_badram, cmd = grub_register_command ("badram", grub_cmd_badram,
"badram ADDR1,MASK1[,ADDR2,MASK2[,...]]", "ADDR1,MASK1[,ADDR2,MASK2[,...]]",
"declare memory regions as badram"); "declare memory regions as badram");
} }

View File

@ -178,7 +178,7 @@ static grub_command_t cmd;
GRUB_MOD_INIT(terminfo) GRUB_MOD_INIT(terminfo)
{ {
cmd = grub_register_command ("terminfo", grub_cmd_terminfo, cmd = grub_register_command ("terminfo", grub_cmd_terminfo,
"terminfo [TERM]", "Set terminfo type."); "[TERM]", "Set terminfo type.");
grub_terminfo_set_current ("vt100"); grub_terminfo_set_current ("vt100");
} }

View File

@ -731,7 +731,7 @@ GRUB_MOD_INIT (video_reader_jpeg)
grub_video_bitmap_reader_register (&jpeg_reader); grub_video_bitmap_reader_register (&jpeg_reader);
#if defined(JPEG_DEBUG) #if defined(JPEG_DEBUG)
grub_register_command ("jpegtest", grub_cmd_jpegtest, grub_register_command ("jpegtest", grub_cmd_jpegtest,
GRUB_COMMAND_FLAG_BOTH, "jpegtest FILE", GRUB_COMMAND_FLAG_BOTH, "FILE",
"Tests loading of JPEG bitmap.", 0); "Tests loading of JPEG bitmap.", 0);
#endif #endif
} }

View File

@ -895,7 +895,7 @@ GRUB_MOD_INIT (video_reader_png)
grub_video_bitmap_reader_register (&png_reader); grub_video_bitmap_reader_register (&png_reader);
#if defined(PNG_DEBUG) #if defined(PNG_DEBUG)
grub_register_command ("pngtest", grub_cmd_pngtest, grub_register_command ("pngtest", grub_cmd_pngtest,
GRUB_COMMAND_FLAG_BOTH, "pngtest FILE", GRUB_COMMAND_FLAG_BOTH, "FILE",
"Tests loading of PNG bitmap.", 0); "Tests loading of PNG bitmap.", 0);
#endif #endif
} }

View File

@ -481,7 +481,7 @@ GRUB_MOD_INIT(video_reader_tga)
grub_video_bitmap_reader_register (&tga_reader); grub_video_bitmap_reader_register (&tga_reader);
#if defined(TGA_DEBUG) #if defined(TGA_DEBUG)
grub_register_command ("tgatest", grub_cmd_tgatest, GRUB_COMMAND_FLAG_BOTH, grub_register_command ("tgatest", grub_cmd_tgatest, GRUB_COMMAND_FLAG_BOTH,
"tgatest FILE", "Tests loading of TGA bitmap.", 0); "FILE", "Tests loading of TGA bitmap.", 0);
#endif #endif
} }