* commands/hashsum.c (GRUB_MOD_INIT): Remove duplication of command

name and add N_.
	* commands/i386/pc/drivemap.c (GRUB_MOD_INIT): Likewise.
	* commands/iorw.c (GRUB_MOD_INIT): Likewise.
	* commands/password_pbkdf2.c (GRUB_MOD_INIT): Likewise.
	* commands/regexp.c (GRUB_MOD_INIT): Likewise.
	* commands/setpci.c (GRUB_MOD_INIT): Likewise.
	* commands/terminal.c (GRUB_MOD_INIT): Likewise.
	* efiemu/main.c (GRUB_MOD_INIT): Likewise.
	* font/font_cmd.c (GRUB_MOD_INIT): Likewise.
	* kern/corecmd.c (GRUB_MOD_INIT): Likewise.
	* mmap/mmap.c (GRUB_MOD_INIT): Likewise.
	* normal/context.c (GRUB_MOD_INIT): Likewise.
	* normal/main.c (GRUB_MOD_INIT): Likewise.
	* term/gfxterm.c (GRUB_MOD_INIT): Likewise.
	* term/serial.c (GRUB_MOD_INIT): Likewise.
	* term/terminfo.c (GRUB_MOD_INIT): Likewise.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-05-01 20:28:07 +02:00
parent 88c14915f8
commit d8b5cd4011
17 changed files with 96 additions and 60 deletions

View file

@ -1,3 +1,23 @@
2010-05-01 Vladimir Serbinenko <phcoder@gmail.com>
* commands/hashsum.c (GRUB_MOD_INIT): Remove duplication of command
name and add N_.
* commands/i386/pc/drivemap.c (GRUB_MOD_INIT): Likewise.
* commands/iorw.c (GRUB_MOD_INIT): Likewise.
* commands/password_pbkdf2.c (GRUB_MOD_INIT): Likewise.
* commands/regexp.c (GRUB_MOD_INIT): Likewise.
* commands/setpci.c (GRUB_MOD_INIT): Likewise.
* commands/terminal.c (GRUB_MOD_INIT): Likewise.
* efiemu/main.c (GRUB_MOD_INIT): Likewise.
* font/font_cmd.c (GRUB_MOD_INIT): Likewise.
* kern/corecmd.c (GRUB_MOD_INIT): Likewise.
* mmap/mmap.c (GRUB_MOD_INIT): Likewise.
* normal/context.c (GRUB_MOD_INIT): Likewise.
* normal/main.c (GRUB_MOD_INIT): Likewise.
* term/gfxterm.c (GRUB_MOD_INIT): Likewise.
* term/serial.c (GRUB_MOD_INIT): Likewise.
* term/terminfo.c (GRUB_MOD_INIT): Likewise.
2010-05-01 Vladimir Serbinenko <phcoder@gmail.com>
* kern/mm.c (grub_real_malloc): Satisfy alignment requirement when

View file

@ -24,13 +24,14 @@
#include <grub/misc.h>
#include <grub/crypto.h>
#include <grub/normal.h>
#include <grub/i18n.h>
static const struct grub_arg_option options[] = {
{"hash", 'h', 0, "Specify hash to use.", "HASH", ARG_TYPE_STRING},
{"check", 'c', 0, "Check hash list file.", "FILE", ARG_TYPE_STRING},
{"prefix", 'p', 0, "Base directory for hash list.", "DIRECTORY",
{"hash", 'h', 0, N_("Specify hash to use."), N_("HASH"), ARG_TYPE_STRING},
{"check", 'c', 0, N_("Check hash list file."), N_("FILE"), ARG_TYPE_STRING},
{"prefix", 'p', 0, N_("Base directory for hash list."), N_("DIRECTORY"),
ARG_TYPE_STRING},
{"keep-going", 'k', 0, "Don't stop after first error.", 0, 0},
{"keep-going", 'k', 0, N_("Don't stop after first error."), 0, 0},
{0, 0, 0, 0, 0, 0}
};
@ -249,21 +250,21 @@ GRUB_MOD_INIT(hashsum)
options);
cmd_md5 = grub_register_extcmd ("md5sum", grub_cmd_hashsum,
GRUB_COMMAND_FLAG_BOTH,
"md5sum [-c FILE [-p PREFIX]] "
"[FILE1 [FILE2 ...]]",
"Compute or check hash checksum.",
N_("[-c FILE [-p PREFIX]] "
"[FILE1 [FILE2 ...]]"),
N_("Compute or check hash checksum."),
options);
cmd_sha256 = grub_register_extcmd ("sha256sum", grub_cmd_hashsum,
GRUB_COMMAND_FLAG_BOTH,
"sha256sum [-c FILE [-p PREFIX]] "
"[FILE1 [FILE2 ...]]",
N_("[-c FILE [-p PREFIX]] "
"[FILE1 [FILE2 ...]]"),
"Compute or check hash checksum.",
options);
cmd_sha512 = grub_register_extcmd ("sha512sum", grub_cmd_hashsum,
GRUB_COMMAND_FLAG_BOTH,
"sha512sum [-c FILE [-p PREFIX]] "
"[FILE1 [FILE2 ...]]",
"Compute or check hash checksum.",
N_("[-c FILE [-p PREFIX]] "
"[FILE1 [FILE2 ...]]"),
N_("Compute or check hash checksum."),
options);
}

View file

@ -402,11 +402,10 @@ GRUB_MOD_INIT (drivemap)
grub_get_root_biosnumber_saved = grub_get_root_biosnumber;
grub_get_root_biosnumber = grub_get_root_biosnumber_drivemap;
cmd = grub_register_extcmd ("drivemap", grub_cmd_drivemap,
GRUB_COMMAND_FLAG_BOTH,
"drivemap"
N_("-l | -r | [-s] grubdev osdisk."),
N_("Manage the BIOS drive mappings."),
options);
GRUB_COMMAND_FLAG_BOTH,
N_("-l | -r | [-s] grubdev osdisk."),
N_("Manage the BIOS drive mappings."),
options);
drivemap_hook =
grub_loader_register_preboot_hook (&install_int13_handler,
&uninstall_int13_handler,

View file

@ -22,14 +22,15 @@
#include <grub/extcmd.h>
#include <grub/env.h>
#include <grub/cpu/io.h>
#include <grub/i18n.h>
static grub_extcmd_t cmd_read_byte, cmd_read_word, cmd_read_dword;
static grub_command_t cmd_write_byte, cmd_write_word, cmd_write_dword;
static const struct grub_arg_option options[] =
{
{0, 'v', 0, "Save read value into variable VARNAME.",
"VARNAME", ARG_TYPE_STRING},
{0, 'v', 0, N_("Save read value into variable VARNAME."),
N_("VARNAME"), ARG_TYPE_STRING},
{0, 0, 0, 0, 0, 0}
};
@ -62,7 +63,7 @@ grub_cmd_read (grub_extcmd_t cmd, int argc, char **argv)
if (cmd->state[0].set)
{
grub_sprintf (buf, "%x", value);
grub_snprintf (buf, sizeof (buf), "%x", value);
grub_env_set (cmd->state[0].arg, buf);
}
else
@ -117,22 +118,25 @@ GRUB_MOD_INIT(memrw)
{
cmd_read_byte =
grub_register_extcmd ("inb", grub_cmd_read, GRUB_COMMAND_FLAG_BOTH,
"PORT", "Read byte from PORT.", options);
N_("PORT"), N_("Read byte from PORT."), options);
cmd_read_word =
grub_register_extcmd ("inw", grub_cmd_read, GRUB_COMMAND_FLAG_BOTH,
"PORT", "Read word from PORT.", options);
N_("PORT"), N_("Read word from PORT."), options);
cmd_read_dword =
grub_register_extcmd ("inl", grub_cmd_read, GRUB_COMMAND_FLAG_BOTH,
"PORT", "Read dword from PORT.", options);
N_("PORT"), N_("Read dword from PORT."), options);
cmd_write_byte =
grub_register_command ("outb", grub_cmd_write,
"PORT VALUE [MASK]", "Write byte VALUE to PORT.");
N_("PORT VALUE [MASK]"),
N_("Write byte VALUE to PORT."));
cmd_write_word =
grub_register_command ("outw", grub_cmd_write,
"PORT VALUE [MASK]", "Write word VALUE to PORT.");
N_("PORT VALUE [MASK]"),
N_("Write word VALUE to PORT."));
cmd_write_dword =
grub_register_command ("outl", grub_cmd_write,
"ADDR VALUE [MASK]", "Write dword VALUE to PORT.");
N_("ADDR VALUE [MASK]"),
N_("Write dword VALUE to PORT."));
}
GRUB_MOD_FINI(memrw)

View file

@ -24,6 +24,7 @@
#include <grub/env.h>
#include <grub/normal.h>
#include <grub/dl.h>
#include <grub/i18n.h>
static grub_dl_t my_mod;
@ -186,8 +187,8 @@ GRUB_MOD_INIT(password_pbkdf2)
{
my_mod = mod;
cmd = grub_register_command ("password_pbkdf2", grub_cmd_password,
"password_pbkdf2 USER PBKDF2_PASSWORD",
"Set user password (PBKDF2). ");
N_("USER PBKDF2_PASSWORD"),
N_("Set user password (PBKDF2). "));
}
GRUB_MOD_FINI(password_pbkdf2)

View file

@ -21,6 +21,7 @@
#include <grub/misc.h>
#include <grub/mm.h>
#include <grub/command.h>
#include <grub/i18n.h>
#include <regex.h>
static grub_err_t
@ -69,8 +70,8 @@ static grub_command_t cmd;
GRUB_MOD_INIT(regexp)
{
cmd = grub_register_command ("regexp", grub_cmd_regexp,
"REGEXP STRING",
"Test if REGEXP matches STRING.");
N_("REGEXP STRING"),
N_("Test if REGEXP matches STRING."));
}
GRUB_MOD_FINI(regexp)

View file

@ -23,6 +23,7 @@
#include <grub/extcmd.h>
#include <grub/env.h>
#include <grub/mm.h>
#include <grub/i18n.h>
struct pci_register
{
@ -329,9 +330,9 @@ static grub_extcmd_t cmd;
GRUB_MOD_INIT(setpci)
{
cmd = grub_register_extcmd ("setpci", grub_cmd_setpci, GRUB_COMMAND_FLAG_BOTH,
"setpci [-s POSITION] [-d DEVICE] [-v VAR] "
"[REGISTER][=VALUE[:MASK]]",
"Manipulate PCI devices.", options);
N_("[-s POSITION] [-d DEVICE] [-v VAR] "
"[REGISTER][=VALUE[:MASK]]"),
N_("Manipulate PCI devices."), options);
}
GRUB_MOD_FINI(setpci)

View file

@ -229,14 +229,14 @@ GRUB_MOD_INIT(terminal)
{
cmd_terminal_input =
grub_register_command ("terminal_input", grub_cmd_terminal_input,
"[--append|--remove] "
"[TERMINAL1] [TERMINAL2] ...",
"List or select an input terminal.");
N_("[--append|--remove] "
"[TERMINAL1] [TERMINAL2] ..."),
N_("List or select an input terminal."));
cmd_terminal_output =
grub_register_command ("terminal_output", grub_cmd_terminal_output,
"[--append|--remove] "
"[TERMINAL1] [TERMINAL2] ...",
"List or select an output terminal.");
N_("[--append|--remove] "
"[TERMINAL1] [TERMINAL2] ..."),
N_("List or select an output terminal."));
}
GRUB_MOD_FINI(terminal)

View file

@ -31,6 +31,7 @@
#include <grub/efiemu/efiemu.h>
#include <grub/machine/efiemu.h>
#include <grub/command.h>
#include <grub/i18n.h>
/* System table. Two version depending on mode */
grub_efi_system_table32_t *grub_efiemu_system_table32 = 0;
@ -327,15 +328,15 @@ GRUB_MOD_INIT(efiemu)
{
cmd_loadcore = grub_register_command ("efiemu_loadcore",
grub_cmd_efiemu_load,
"FILE",
"Load and initialize EFI emulator.");
N_("FILE"),
N_("Load and initialize EFI emulator."));
cmd_prepare = grub_register_command ("efiemu_prepare",
grub_cmd_efiemu_prepare,
0,
"Finalize loading of EFI emulator.");
N_("Finalize loading of EFI emulator."));
cmd_unload = grub_register_command ("efiemu_unload", grub_cmd_efiemu_unload,
0,
"Unload EFI emulator.");
N_("Unload EFI emulator."));
}
GRUB_MOD_FINI(efiemu)

View file

@ -21,6 +21,7 @@
#include <grub/dl.h>
#include <grub/misc.h>
#include <grub/command.h>
#include <grub/i18n.h>
static grub_err_t
loadfont_command (grub_command_t cmd __attribute__ ((unused)),
@ -62,11 +63,11 @@ GRUB_MOD_INIT(font)
cmd_loadfont =
grub_register_command ("loadfont", loadfont_command,
"FILE...",
"Specify one or more font files to load.");
N_("FILE..."),
N_("Specify one or more font files to load."));
cmd_lsfonts =
grub_register_command ("lsfonts", lsfonts_command,
0, "List the loaded fonts.");
0, N_("List the loaded fonts."));
}
GRUB_MOD_FINI(font)

View file

@ -26,6 +26,7 @@
#include <grub/file.h>
#include <grub/device.h>
#include <grub/command.h>
#include <grub/i18n.h>
/* set ENVVAR=VALUE */
static grub_err_t
@ -178,11 +179,13 @@ void
grub_register_core_commands (void)
{
grub_register_command ("set", grub_core_cmd_set,
"[ENVVAR=VALUE]", "Set an environment variable.");
N_("[ENVVAR=VALUE]"),
N_("Set an environment variable."));
grub_register_command ("unset", grub_core_cmd_unset,
"ENVVAR", "Remove an environment variable.");
N_("ENVVAR"),
N_("Remove an environment variable."));
grub_register_command ("ls", grub_core_cmd_ls,
"[ARG]", "List devices or files.");
N_("[ARG]"), N_("List devices or files."));
grub_register_command ("insmod", grub_core_cmd_insmod,
"MODULE", "Insert a module.");
N_("MODULE"), N_("Insert a module."));
}

View file

@ -24,6 +24,7 @@
#include <grub/mm.h>
#include <grub/command.h>
#include <grub/dl.h>
#include <grub/i18n.h>
#ifndef GRUB_MMAP_REGISTER_BY_FIRMWARE
@ -414,8 +415,8 @@ static grub_command_t cmd;
GRUB_MOD_INIT(mmap)
{
cmd = grub_register_command ("badram", grub_cmd_badram,
"ADDR1,MASK1[,ADDR2,MASK2[,...]]",
"Declare memory regions as badram.");
N_("ADDR1,MASK1[,ADDR2,MASK2[,...]]"),
N_("Declare memory regions as badram."));
}
GRUB_MOD_FINI(mmap)

View file

@ -23,6 +23,7 @@
#include <grub/mm.h>
#include <grub/command.h>
#include <grub/normal.h>
#include <grub/i18n.h>
struct menu_pointer
{
@ -172,7 +173,7 @@ grub_context_init (void)
grub_env_export ("prefix");
export_cmd = grub_register_command ("export", grub_cmd_export,
"export ENVVAR", "Export a variable.");
N_("ENVVAR"), N_("Export a variable."));
}
void

View file

@ -705,9 +705,9 @@ GRUB_MOD_INIT(normal)
/* Register a command "normal" for the rescue mode. */
grub_register_command ("normal", grub_cmd_normal,
0, "Enter normal mode.");
0, N_("Enter normal mode."));
grub_register_command ("normal_exit", grub_cmd_normal_exit,
0, "Exit from normal mode.");
0, N_("Exit from normal mode."));
/* Reload terminal colors when these variables are written to. */
grub_register_variable_hook ("color_normal", NULL, grub_env_write_color_normal);

View file

@ -29,6 +29,7 @@
#include <grub/command.h>
#include <grub/extcmd.h>
#include <grub/bitmap_scale.h>
#include <grub/i18n.h>
#define DEFAULT_VIDEO_MODE "auto"
#define DEFAULT_BORDER_WIDTH 10
@ -1187,8 +1188,8 @@ GRUB_MOD_INIT(gfxterm)
grub_register_extcmd ("background_image",
grub_gfxterm_background_image_cmd,
GRUB_COMMAND_FLAG_BOTH,
"[-m (stretch|normal)] FILE",
"Load background image for active terminal.",
N_("[-m (stretch|normal)] FILE"),
N_("Load background image for active terminal."),
background_image_cmd_options);
}

View file

@ -616,8 +616,8 @@ GRUB_MOD_INIT(serial)
{
cmd = grub_register_extcmd ("serial", grub_cmd_serial,
GRUB_COMMAND_FLAG_BOTH,
"serial [OPTIONS...]",
"Configure serial port.", options);
N_("[OPTIONS...]"),
N_("Configure serial port."), options);
/* Set default settings. */
serial_settings.port = serial_hw_get_port (0);

View file

@ -31,6 +31,7 @@
#include <grub/terminfo.h>
#include <grub/tparm.h>
#include <grub/command.h>
#include <grub/i18n.h>
struct terminfo
{
@ -178,7 +179,7 @@ static grub_command_t cmd;
GRUB_MOD_INIT(terminfo)
{
cmd = grub_register_command ("terminfo", grub_cmd_terminfo,
"[TERM]", "Set terminfo type.");
N_("[TERM]"), N_("Set terminfo type."));
grub_terminfo_set_current ("vt100");
}