Improve string. Gettextize.
This commit is contained in:
parent
78dde88e8c
commit
d61386e21d
64 changed files with 219 additions and 131 deletions
|
@ -1,3 +1,7 @@
|
|||
2012-02-08 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Improve string. Gettextize.
|
||||
|
||||
2012-02-11 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* configure.ac: Remove -Winline altogether and -Wmissing-prototypes on
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <grub/mm.h>
|
||||
#include <grub/usb.h>
|
||||
#include <grub/usbserial.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
|
@ -137,19 +138,23 @@ ftdi_hw_configure (struct grub_serial_port *port,
|
|||
|
||||
divisor = get_divisor (config->speed);
|
||||
if (divisor == 0)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad speed");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("unsupported serial port speed"));
|
||||
|
||||
if (config->parity != GRUB_SERIAL_PARITY_NONE
|
||||
&& config->parity != GRUB_SERIAL_PARITY_ODD
|
||||
&& config->parity != GRUB_SERIAL_PARITY_EVEN)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported parity");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("unsupported serial port parity"));
|
||||
|
||||
if (config->stop_bits != GRUB_SERIAL_STOP_BITS_1
|
||||
&& config->stop_bits != GRUB_SERIAL_STOP_BITS_2)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported stop bits");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("unsupported serial port stop bits number"));
|
||||
|
||||
if (config->word_len < 5 || config->word_len > 8)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported word length");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("unsupported serial port word length"));
|
||||
|
||||
port->config = *config;
|
||||
port->configured = 0;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <grub/mm.h>
|
||||
#include <grub/usb.h>
|
||||
#include <grub/usbserial.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
|
@ -150,19 +151,23 @@ pl2303_hw_configure (struct grub_serial_port *port,
|
|||
struct grub_serial_config *config)
|
||||
{
|
||||
if (!is_speed_supported (config->speed))
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad speed");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("unsupported serial port speed"));
|
||||
|
||||
if (config->parity != GRUB_SERIAL_PARITY_NONE
|
||||
&& config->parity != GRUB_SERIAL_PARITY_ODD
|
||||
&& config->parity != GRUB_SERIAL_PARITY_EVEN)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported parity");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("unsupported serial port parity"));
|
||||
|
||||
if (config->stop_bits != GRUB_SERIAL_STOP_BITS_1
|
||||
&& config->stop_bits != GRUB_SERIAL_STOP_BITS_2)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported stop bits");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("unsupported serial port stop bits number"));
|
||||
|
||||
if (config->word_len < 5 || config->word_len > 8)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported word length");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("unsupported serial port word length"));
|
||||
|
||||
port->config = *config;
|
||||
port->configured = 0;
|
||||
|
|
|
@ -133,7 +133,8 @@ grub_cmd_gptsync (grub_command_t cmd __attribute__ ((unused)),
|
|||
if (! partition)
|
||||
{
|
||||
grub_device_close (dev);
|
||||
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no such partition");
|
||||
return grub_error (GRUB_ERR_UNKNOWN_DEVICE,
|
||||
N_("no such partition"));
|
||||
}
|
||||
|
||||
if (partition->start + partition->len > 0xffffffff)
|
||||
|
|
|
@ -60,7 +60,7 @@ grub_cmd_cmostest (struct grub_command *cmd __attribute__ ((unused)),
|
|||
if (value & (1 << bit))
|
||||
return GRUB_ERR_NONE;
|
||||
|
||||
return grub_error (GRUB_ERR_TEST_FAILURE, "false");
|
||||
return grub_error (GRUB_ERR_TEST_FAILURE, N_("false"));
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
|
|
|
@ -50,7 +50,9 @@ grub_cmd_cpuid (grub_extcmd_context_t ctxt __attribute__ ((unused)),
|
|||
char **args __attribute__ ((unused)))
|
||||
{
|
||||
return grub_cpuid_has_longmode ? GRUB_ERR_NONE
|
||||
: grub_error (GRUB_ERR_TEST_FAILURE, "false");
|
||||
/* TRANSLATORS: it's a standalone boolean value,
|
||||
opposite of "true". */
|
||||
: grub_error (GRUB_ERR_TEST_FAILURE, N_("false"));
|
||||
}
|
||||
|
||||
static grub_extcmd_t cmd;
|
||||
|
|
|
@ -72,7 +72,7 @@ grub_cmd_lsapm (grub_command_t cmd __attribute__ ((unused)),
|
|||
{
|
||||
struct grub_apm_info info;
|
||||
if (!grub_apm_get_info (&info))
|
||||
return grub_error (GRUB_ERR_IO, "no APM found");
|
||||
return grub_error (GRUB_ERR_IO, N_("no APM found"));
|
||||
|
||||
grub_printf_ (N_("Version %u.%u\n"
|
||||
"32-bit CS = 0x%x, len = 0x%x, offset = 0x%x\n"
|
||||
|
|
|
@ -181,7 +181,8 @@ grub_cmd_play (grub_command_t cmd __attribute__ ((unused)),
|
|||
{
|
||||
|
||||
if (argc < 1)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name or tempo and notes required");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("filename or tempo and notes expected"));
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
|
|
|
@ -78,11 +78,11 @@ grub_cmd_keystatus (grub_extcmd_context_t ctxt,
|
|||
|
||||
FOR_ACTIVE_TERM_INPUTS (term)
|
||||
if (!term->getkeystatus)
|
||||
return grub_error (GRUB_ERR_TEST_FAILURE, "false");
|
||||
return grub_error (GRUB_ERR_TEST_FAILURE, N_("false"));
|
||||
else
|
||||
nterms++;
|
||||
if (!nterms)
|
||||
return grub_error (GRUB_ERR_TEST_FAILURE, "false");
|
||||
return grub_error (GRUB_ERR_TEST_FAILURE, N_("false"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ grub_cmd_keystatus (grub_extcmd_context_t ctxt,
|
|||
if (mods >= 0 && (mods & expect_mods) != 0)
|
||||
return 0;
|
||||
else
|
||||
return grub_error (GRUB_ERR_TEST_FAILURE, "false");
|
||||
return grub_error (GRUB_ERR_TEST_FAILURE, N_("false"));
|
||||
}
|
||||
|
||||
static grub_extcmd_t cmd;
|
||||
|
|
|
@ -454,7 +454,7 @@ grub_cmd_legacy_kernel (struct grub_command *mycmd __attribute__ ((unused)),
|
|||
}
|
||||
while (0);
|
||||
|
||||
return grub_error (GRUB_ERR_BAD_OS, "couldn't load file %s\n",
|
||||
return grub_error (GRUB_ERR_BAD_OS, "couldn't load file %s",
|
||||
args[0]);
|
||||
}
|
||||
|
||||
|
@ -468,7 +468,8 @@ grub_cmd_legacy_initrd (struct grub_command *mycmd __attribute__ ((unused)),
|
|||
{
|
||||
cmd = grub_command_find ("initrd16");
|
||||
if (!cmd)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "command initrd16 not found");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("can't find command `%s'"),
|
||||
"initrd16");
|
||||
|
||||
return cmd->func (cmd, argc, args);
|
||||
}
|
||||
|
@ -476,13 +477,14 @@ grub_cmd_legacy_initrd (struct grub_command *mycmd __attribute__ ((unused)),
|
|||
{
|
||||
cmd = grub_command_find ("module");
|
||||
if (!cmd)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "command module not found");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("can't find command `%s'"),
|
||||
"module");
|
||||
|
||||
return cmd->func (cmd, argc, args);
|
||||
}
|
||||
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
"you need to load the kernel first");
|
||||
N_("you need to load the kernel first"));
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
|
@ -495,7 +497,8 @@ grub_cmd_legacy_initrdnounzip (struct grub_command *mycmd __attribute__ ((unused
|
|||
{
|
||||
cmd = grub_command_find ("initrd16");
|
||||
if (!cmd)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "command initrd16 not found");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("can't find command `%s'"),
|
||||
"initrd16");
|
||||
|
||||
return cmd->func (cmd, argc, args);
|
||||
}
|
||||
|
@ -511,7 +514,8 @@ grub_cmd_legacy_initrdnounzip (struct grub_command *mycmd __attribute__ ((unused
|
|||
newargs[0] = nounzipbuf;
|
||||
cmd = grub_command_find ("module");
|
||||
if (!cmd)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "command module not found");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("can't find command `%s'"),
|
||||
"module");
|
||||
|
||||
err = cmd->func (cmd, argc + 1, newargs);
|
||||
grub_free (newargs);
|
||||
|
@ -519,7 +523,7 @@ grub_cmd_legacy_initrdnounzip (struct grub_command *mycmd __attribute__ ((unused
|
|||
}
|
||||
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
"you need to load the kernel first");
|
||||
N_("you need to load the kernel first"));
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
|
|
|
@ -269,7 +269,7 @@ grub_cmd_parttool (grub_command_t cmd __attribute__ ((unused)),
|
|||
break;
|
||||
}
|
||||
if (! cur)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unrecognised argument %s",
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("unknown argument `%s'"),
|
||||
args[i]);
|
||||
ptool = cur;
|
||||
pargs = (struct grub_parttool_args *)
|
||||
|
|
|
@ -94,7 +94,7 @@ grub_cmd_password (grub_command_t cmd __attribute__ ((unused)),
|
|||
|
||||
if (grub_memcmp (args[1], "grub.pbkdf2.sha512.",
|
||||
sizeof ("grub.pbkdf2.sha512.") - 1) != 0)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "incorrect PBKDF2 password");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("invalid PBKDF2 password"));
|
||||
|
||||
ptr = args[1] + sizeof ("grub.pbkdf2.sha512.") - 1;
|
||||
|
||||
|
@ -103,10 +103,12 @@ grub_cmd_password (grub_command_t cmd __attribute__ ((unused)),
|
|||
return grub_errno;
|
||||
|
||||
pass->c = grub_strtoul (ptr, &ptr, 0);
|
||||
if (grub_errno)
|
||||
return grub_errno;
|
||||
if (*ptr != '.')
|
||||
{
|
||||
grub_free (pass);
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "incorrect PBKDF2 password");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("invalid PBKDF2 password"));
|
||||
}
|
||||
ptr++;
|
||||
|
||||
|
@ -114,7 +116,7 @@ grub_cmd_password (grub_command_t cmd __attribute__ ((unused)),
|
|||
if (!ptr2 || ((ptr2 - ptr) & 1) || grub_strlen (ptr2 + 1) & 1)
|
||||
{
|
||||
grub_free (pass);
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "incorrect PBKDF2 password");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("invalid PBKDF2 password"));
|
||||
}
|
||||
|
||||
pass->saltlen = (ptr2 - ptr) >> 1;
|
||||
|
@ -137,7 +139,7 @@ grub_cmd_password (grub_command_t cmd __attribute__ ((unused)),
|
|||
grub_free (pass->salt);
|
||||
grub_free (pass);
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
"incorrect PBKDF2 password");
|
||||
N_("invalid PBKDF2 password"));
|
||||
}
|
||||
|
||||
*ptro = (hex1 << 4) | hex2;
|
||||
|
@ -166,7 +168,7 @@ grub_cmd_password (grub_command_t cmd __attribute__ ((unused)),
|
|||
grub_free (pass->salt);
|
||||
grub_free (pass);
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
"incorrect PBKDF2 password");
|
||||
N_("invalid PBKDF2 password"));
|
||||
}
|
||||
|
||||
*ptro = (hex1 << 4) | hex2;
|
||||
|
|
|
@ -108,7 +108,8 @@ handle_command (int argc, char **args, struct abstract_terminal **enabled,
|
|||
if (term)
|
||||
break;
|
||||
if (again)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unknown terminal '%s'\n",
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("terminal `%s' isn't found"),
|
||||
args[i]);
|
||||
for (aut = autoloads; aut; aut = aut->next)
|
||||
if (grub_strcmp (args[i], aut->name) == 0
|
||||
|
@ -126,7 +127,8 @@ handle_command (int argc, char **args, struct abstract_terminal **enabled,
|
|||
break;
|
||||
}
|
||||
if (!aut)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unknown terminal '%s'\n",
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("terminal `%s' isn't found"),
|
||||
args[i]);
|
||||
again = 1;
|
||||
}
|
||||
|
|
|
@ -416,7 +416,7 @@ grub_cmd_test (grub_command_t cmd __attribute__ ((unused)),
|
|||
argc--;
|
||||
|
||||
return test_parse (args, &argn, argc) ? GRUB_ERR_NONE
|
||||
: grub_error (GRUB_ERR_TEST_FAILURE, "false");
|
||||
: grub_error (GRUB_ERR_TEST_FAILURE, N_("false"));
|
||||
}
|
||||
|
||||
static grub_command_t cmd_1, cmd_2;
|
||||
|
|
|
@ -35,12 +35,12 @@ grub_cmd_time (grub_command_t ctxt __attribute__ ((unused)),
|
|||
grub_uint32_t end;
|
||||
|
||||
if (argc == 0)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "command expected");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("no command is specified"));
|
||||
|
||||
cmd = grub_command_find (args[0]);
|
||||
|
||||
if (!cmd)
|
||||
return grub_error (GRUB_ERR_UNKNOWN_COMMAND, "Unknown command `%s'\n",
|
||||
return grub_error (GRUB_ERR_UNKNOWN_COMMAND, N_("can't find command `%s'"),
|
||||
args[0]);
|
||||
|
||||
start = grub_get_time_ms ();
|
||||
|
|
|
@ -36,7 +36,7 @@ grub_cmd_false (struct grub_command *cmd __attribute__ ((unused)),
|
|||
int argc __attribute__ ((unused)),
|
||||
char *argv[] __attribute__ ((unused)))
|
||||
{
|
||||
return grub_error (GRUB_ERR_TEST_FAILURE, "false");
|
||||
return grub_error (GRUB_ERR_TEST_FAILURE, N_("false"));
|
||||
}
|
||||
|
||||
static grub_command_t cmd_true, cmd_false;
|
||||
|
|
|
@ -126,7 +126,9 @@ grub_cmd_videoinfo (grub_command_t cmd __attribute__ ((unused)),
|
|||
if (grub_errno)
|
||||
return grub_errno;
|
||||
if (*ptr != 'x')
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid mode specification");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("invalid video mode specification `%s'"),
|
||||
args[0]);
|
||||
ptr++;
|
||||
height = grub_strtoul (ptr, &ptr, 0);
|
||||
if (grub_errno)
|
||||
|
|
|
@ -258,7 +258,7 @@ grub_arcdisk_read (grub_disk_t disk, grub_disk_addr_t sector,
|
|||
totl, &count))
|
||||
return grub_error (GRUB_ERR_READ_ERROR,
|
||||
N_("failure reading sector 0x%llx "
|
||||
" from `%s'"),
|
||||
"from `%s'"),
|
||||
(unsigned long long) sector,
|
||||
disk->name);
|
||||
totl -= count;
|
||||
|
@ -294,7 +294,7 @@ grub_arcdisk_write (grub_disk_t disk, grub_disk_addr_t sector,
|
|||
if (GRUB_ARC_FIRMWARE_VECTOR->write (last_handle, buf,
|
||||
totl, &count))
|
||||
return grub_error (GRUB_ERR_WRITE_ERROR, N_("failure writing sector 0x%llx "
|
||||
" from `%s'"),
|
||||
"to `%s'"),
|
||||
(unsigned long long) sector,
|
||||
disk->name);
|
||||
totl -= count;
|
||||
|
|
|
@ -402,7 +402,7 @@ grub_diskfilter_read_node (const struct grub_diskfilter_node *node,
|
|||
0, size << GRUB_DISK_SECTOR_BITS, buf);
|
||||
else
|
||||
return grub_error (GRUB_ERR_UNKNOWN_DEVICE,
|
||||
"physical volume %s not found", node->pv->name);
|
||||
N_("physical volume %s not found"), node->pv->name);
|
||||
|
||||
}
|
||||
if (node->lv)
|
||||
|
@ -601,7 +601,8 @@ read_segment (struct grub_diskfilter_segment *seg, grub_disk_addr_t sector,
|
|||
buf, read_sector + b,
|
||||
read_size) :
|
||||
grub_error (GRUB_ERR_BAD_DEVICE,
|
||||
"raid6rec is not loaded"));
|
||||
N_("module `%s' isn't loaded"),
|
||||
"raid6rec"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -610,7 +611,8 @@ read_segment (struct grub_diskfilter_segment *seg, grub_disk_addr_t sector,
|
|||
buf, read_sector + b,
|
||||
read_size) :
|
||||
grub_error (GRUB_ERR_BAD_DEVICE,
|
||||
"raid5rec is not loaded"));
|
||||
N_("module `%s' isn't loaded"),
|
||||
"raid5rec"));
|
||||
}
|
||||
|
||||
if (err)
|
||||
|
|
|
@ -533,7 +533,10 @@ grub_efidisk_read (struct grub_disk *disk, grub_disk_addr_t sector,
|
|||
(grub_efi_uintn_t) size << disk->log_sector_size,
|
||||
buf);
|
||||
if (status != GRUB_EFI_SUCCESS)
|
||||
return grub_error (GRUB_ERR_READ_ERROR, "efidisk read error");
|
||||
return grub_error (GRUB_ERR_READ_ERROR,
|
||||
N_("failure reading sector 0x%llx from `%s'"),
|
||||
(unsigned long long) sector,
|
||||
disk->name);
|
||||
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
@ -559,7 +562,9 @@ grub_efidisk_write (struct grub_disk *disk, grub_disk_addr_t sector,
|
|||
(grub_efi_uintn_t) size << disk->log_sector_size,
|
||||
(void *) buf);
|
||||
if (status != GRUB_EFI_SUCCESS)
|
||||
return grub_error (GRUB_ERR_WRITE_ERROR, "efidisk write error");
|
||||
return grub_error (GRUB_ERR_WRITE_ERROR,
|
||||
N_("failure writing sector 0x%llx to `%s'"),
|
||||
(unsigned long long) sector, disk->name);
|
||||
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
|
|
@ -465,7 +465,7 @@ grub_biosdisk_rw (int cmd, grub_disk_t disk,
|
|||
int i;
|
||||
|
||||
if (cmd)
|
||||
return grub_error (GRUB_ERR_WRITE_ERROR, "can\'t write to cdrom");
|
||||
return grub_error (GRUB_ERR_WRITE_ERROR, N_("cannot write to cdrom"));
|
||||
|
||||
for (i = 0; i < GRUB_BIOSDISK_CDROM_RETRY_COUNT; i++)
|
||||
if (! grub_biosdisk_rw_int13_extensions (0x42, data->drive, dap))
|
||||
|
@ -473,7 +473,7 @@ grub_biosdisk_rw (int cmd, grub_disk_t disk,
|
|||
|
||||
if (i == GRUB_BIOSDISK_CDROM_RETRY_COUNT)
|
||||
return grub_error (GRUB_ERR_READ_ERROR, N_("failure reading sector 0x%llx "
|
||||
" from `%s'"),
|
||||
"from `%s'"),
|
||||
(unsigned long long) sector,
|
||||
disk->name);
|
||||
}
|
||||
|
@ -497,7 +497,9 @@ grub_biosdisk_rw (int cmd, grub_disk_t disk,
|
|||
1024 /* cylinders */ *
|
||||
256 /* heads */ *
|
||||
63 /* spt */)
|
||||
return grub_error (GRUB_ERR_OUT_OF_RANGE, "%s out of disk", disk->name);
|
||||
return grub_error (GRUB_ERR_OUT_OF_RANGE,
|
||||
N_("attempt to read or write outside of disk `%s'"),
|
||||
disk->name);
|
||||
|
||||
soff = ((grub_uint32_t) sector) % data->sectors + 1;
|
||||
head = ((grub_uint32_t) sector) / data->sectors;
|
||||
|
@ -516,12 +518,12 @@ grub_biosdisk_rw (int cmd, grub_disk_t disk,
|
|||
{
|
||||
case GRUB_BIOSDISK_READ:
|
||||
return grub_error (GRUB_ERR_READ_ERROR, N_("failure reading sector 0x%llx "
|
||||
" from `%s'"),
|
||||
"from `%s'"),
|
||||
(unsigned long long) sector,
|
||||
disk->name);
|
||||
case GRUB_BIOSDISK_WRITE:
|
||||
return grub_error (GRUB_ERR_WRITE_ERROR, N_("failure writing sector 0x%llx "
|
||||
" from `%s'"),
|
||||
"to `%s'"),
|
||||
(unsigned long long) sector,
|
||||
disk->name);
|
||||
}
|
||||
|
@ -587,7 +589,7 @@ grub_biosdisk_write (grub_disk_t disk, grub_disk_addr_t sector,
|
|||
struct grub_biosdisk_data *data = disk->data;
|
||||
|
||||
if (data->flags & GRUB_BIOSDISK_FLAG_CDROM)
|
||||
return grub_error (GRUB_ERR_IO, "can't write to CDROM");
|
||||
return grub_error (GRUB_ERR_IO, N_("cannot write to cdrom"));
|
||||
|
||||
while (size)
|
||||
{
|
||||
|
|
|
@ -179,7 +179,7 @@ grub_nand_read (grub_disk_t disk, grub_disk_addr_t sector,
|
|||
|
||||
if ((IEEE1275_CALL_ENTRY_FN (&args) == -1) || (args.result))
|
||||
return grub_error (GRUB_ERR_READ_ERROR, N_("failure reading sector 0x%llx "
|
||||
" from `%s'"),
|
||||
"from `%s'"),
|
||||
(unsigned long long) sector,
|
||||
disk->name);
|
||||
|
||||
|
|
|
@ -366,7 +366,7 @@ grub_ofdisk_read (grub_disk_t disk, grub_disk_addr_t sector,
|
|||
&actual);
|
||||
if (actual != (grub_ssize_t) (size << GRUB_DISK_SECTOR_BITS))
|
||||
return grub_error (GRUB_ERR_READ_ERROR, N_("failure reading sector 0x%llx "
|
||||
" from `%s'"),
|
||||
"from `%s'"),
|
||||
(unsigned long long) sector,
|
||||
disk->name);
|
||||
|
||||
|
@ -386,7 +386,7 @@ grub_ofdisk_write (grub_disk_t disk, grub_disk_addr_t sector,
|
|||
&actual);
|
||||
if (actual != (grub_ssize_t) (size << GRUB_DISK_SECTOR_BITS))
|
||||
return grub_error (GRUB_ERR_WRITE_ERROR, N_("failure writing sector 0x%llx "
|
||||
" from `%s'"),
|
||||
"to `%s'"),
|
||||
(unsigned long long) sector,
|
||||
disk->name);
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <grub/scsi.h>
|
||||
#include <grub/scsicmd.h>
|
||||
#include <grub/time.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
|
@ -718,7 +719,7 @@ grub_scsi_write (grub_disk_t disk __attribute((unused)),
|
|||
scsi = disk->data;
|
||||
|
||||
if (scsi->devtype == grub_scsi_devtype_cdrom)
|
||||
return grub_error (GRUB_ERR_IO, "no CD burning");
|
||||
return grub_error (GRUB_ERR_IO, N_("cannot write to cdrom"));
|
||||
|
||||
while (size)
|
||||
{
|
||||
|
|
|
@ -216,7 +216,7 @@ read_bfs_file (grub_disk_t disk,
|
|||
|
||||
if (off + len > grub_bfs_to_cpu64 (ino->size))
|
||||
return grub_error (GRUB_ERR_OUT_OF_RANGE,
|
||||
"attempt to read past the end of file");
|
||||
N_("attempt to read past the end of file"));
|
||||
|
||||
if (off < (grub_bfs_to_cpu64 (ino->max_direct_range) << RANGE_SHIFT))
|
||||
{
|
||||
|
|
|
@ -574,7 +574,9 @@ find_device (struct grub_btrfs_data *data, grub_uint64_t id, int do_rescan)
|
|||
grub_device_iterate (hook);
|
||||
if (!dev_found)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "couldn't find a member device");
|
||||
grub_error (GRUB_ERR_BAD_FS,
|
||||
N_("couldn't find a necesssary member device "
|
||||
"of multi-device filesystem"));
|
||||
return NULL;
|
||||
}
|
||||
data->n_devices_attached++;
|
||||
|
|
|
@ -487,7 +487,8 @@ read_data (struct grub_ntfs_attr *at, char *pa, char *dest,
|
|||
|
||||
return (grub_ntfscomp_func) ? grub_ntfscomp_func (at, dest, ofs, len, ctx,
|
||||
vcn) :
|
||||
grub_error (GRUB_ERR_BAD_FS, "ntfscomp module not loaded");
|
||||
grub_error (GRUB_ERR_BAD_FS, N_("module `%s' isn't loaded"),
|
||||
"ntfscomp");
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
|
|
|
@ -415,7 +415,7 @@ zio_checksum_verify (zio_cksum_t zc, grub_uint32_t checksum,
|
|||
(unsigned long long) zc.zc_word[1],
|
||||
(unsigned long long) zc.zc_word[2],
|
||||
(unsigned long long) zc.zc_word[3]);
|
||||
return grub_error (GRUB_ERR_BAD_FS, "checksum verification failed");
|
||||
return grub_error (GRUB_ERR_BAD_FS, N_("checksum verification failed"));
|
||||
}
|
||||
|
||||
return GRUB_ERR_NONE;
|
||||
|
@ -1204,7 +1204,9 @@ read_device (grub_uint64_t offset, struct grub_zfs_device_desc *desc,
|
|||
sector = DVA_OFFSET_TO_PHYS_SECTOR (offset);
|
||||
if (!desc->dev)
|
||||
{
|
||||
return grub_error (GRUB_ERR_BAD_FS, "member drive unknown");
|
||||
return grub_error (GRUB_ERR_BAD_FS,
|
||||
N_("couldn't find a necesssary member device "
|
||||
"of multi-device filesystem"));
|
||||
}
|
||||
/* read in a data block */
|
||||
return grub_disk_read (desc->dev->disk, sector, 0, len, buf);
|
||||
|
@ -1608,7 +1610,9 @@ zio_read (blkptr_t *bp, grub_zfs_endian_t endian, void **buf,
|
|||
if (encrypted)
|
||||
{
|
||||
if (!grub_zfs_decrypt)
|
||||
err = grub_error (GRUB_ERR_BAD_FS, "zfscrypt module not loaded");
|
||||
err = grub_error (GRUB_ERR_BAD_FS,
|
||||
N_("module `%s' isn't loaded"),
|
||||
"zfscrypt");
|
||||
else
|
||||
{
|
||||
unsigned i, besti = 0;
|
||||
|
|
|
@ -288,7 +288,7 @@ grub_zfs_decrypt_real (grub_crypto_cipher_handle_t cipher,
|
|||
|
||||
if (!cipher)
|
||||
return grub_error (GRUB_ERR_ACCESS_DENIED,
|
||||
"no decryption key available");;
|
||||
N_("no decryption key available"));
|
||||
err = algo_decrypt (cipher, algo,
|
||||
(grub_uint8_t *) buf,
|
||||
(grub_uint8_t *) buf,
|
||||
|
@ -300,7 +300,7 @@ grub_zfs_decrypt_real (grub_crypto_cipher_handle_t cipher,
|
|||
for (i = 0; i < 3; i++)
|
||||
if (grub_zfs_to_cpu32 (expected_mac[i], endian)
|
||||
!= grub_be_to_cpu32 (mac[i]))
|
||||
return grub_error (GRUB_ERR_BAD_FS, "MAC verification failed");
|
||||
return grub_error (GRUB_ERR_BAD_FS, N_("MAC verification failed"));
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
|
|
|
@ -249,7 +249,7 @@ grub_cmd_zfsinfo (grub_command_t cmd __attribute__ ((unused)), int argc,
|
|||
int found;
|
||||
|
||||
if (argc < 1)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "device name required");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("one argument expected"));
|
||||
|
||||
if (args[0][0] == '(' && args[0][grub_strlen (args[0]) - 1] == ')')
|
||||
{
|
||||
|
@ -325,7 +325,7 @@ grub_cmd_zfs_bootfs (grub_command_t cmd __attribute__ ((unused)), int argc,
|
|||
grub_uint64_t mdnobj;
|
||||
|
||||
if (argc < 1)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "filesystem name required");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("one argument expected"));
|
||||
|
||||
devname = grub_file_get_device_name (args[0]);
|
||||
if (grub_errno)
|
||||
|
|
|
@ -373,7 +373,7 @@ grub_cmd_translate (grub_command_t cmd __attribute__ ((unused)),
|
|||
int argc, char **args)
|
||||
{
|
||||
if (argc != 1)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "text to translate required");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("one argument expected"));
|
||||
|
||||
const char *translation;
|
||||
translation = grub_gettext_translate (args[0]);
|
||||
|
|
|
@ -33,7 +33,7 @@ grub_cmd_hello (grub_extcmd_context_t ctxt __attribute__ ((unused)),
|
|||
int argc __attribute__ ((unused)),
|
||||
char **args __attribute__ ((unused)))
|
||||
{
|
||||
grub_printf ("Hello World\n");
|
||||
grub_printf ("%s\n", _("Hello World"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1172,20 +1172,20 @@ test_zlib_header (grub_gzio_t gzio)
|
|||
/* Check that compression method is DEFLATE. */
|
||||
if ((cmf & 0xf) != DEFLATED)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "unsupported gzip format");
|
||||
grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, N_("unsupported gzip format"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((cmf * 256 + flg) % 31)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "unsupported gzip format");
|
||||
grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, N_("unsupported gzip format"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Dictionary isn't supported. */
|
||||
if (flg & 0x20)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "unsupported gzip format");
|
||||
grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, N_("unsupported gzip format"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -509,7 +509,7 @@ grub_lzopio_read (grub_file_t file, char *buf, grub_size_t len)
|
|||
return ret;
|
||||
|
||||
CORRUPTED:
|
||||
grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, "lzop file corrupted");
|
||||
grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, N_("lzop file corrupted"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -278,7 +278,7 @@ grub_xzio_read (grub_file_t file, char *buf, grub_size_t len)
|
|||
case XZ_DATA_ERROR:
|
||||
case XZ_BUF_ERROR:
|
||||
grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
|
||||
"file corrupted or unsupported block options");
|
||||
N_("xz file corrupted or unsupported block options"));
|
||||
return -1;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -68,7 +68,7 @@ grub_core_cmd_unset (struct grub_command *cmd __attribute__ ((unused)),
|
|||
{
|
||||
if (argc < 1)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
"no environment variable specified");
|
||||
N_("one argument expected"));
|
||||
|
||||
grub_env_unset (argv[0]);
|
||||
return 0;
|
||||
|
@ -83,7 +83,7 @@ grub_core_cmd_insmod (struct grub_command *cmd __attribute__ ((unused)),
|
|||
grub_dl_t mod;
|
||||
|
||||
if (argc == 0)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "no module specified");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("one argument expected"));
|
||||
|
||||
p = grub_strchr (argv[0], '/');
|
||||
if (! p)
|
||||
|
|
|
@ -284,7 +284,7 @@ grub_disk_open (const char *name)
|
|||
disk->partition = grub_partition_probe (disk, p + 1);
|
||||
if (! disk->partition)
|
||||
{
|
||||
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no such partition");
|
||||
grub_error (GRUB_ERR_UNKNOWN_DEVICE, N_("no such partition"));
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -373,7 +373,7 @@ grub_strtoul (const char *str, char **end, int base)
|
|||
#if GRUB_CPU_SIZEOF_LONG != 8
|
||||
if (num > ~0UL)
|
||||
{
|
||||
grub_error (GRUB_ERR_OUT_OF_RANGE, "overflow is detected");
|
||||
grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected"));
|
||||
return ~0UL;
|
||||
}
|
||||
#endif
|
||||
|
@ -427,7 +427,8 @@ grub_strtoull (const char *str, char **end, int base)
|
|||
/* NUM * BASE + DIGIT > ~0ULL */
|
||||
if (num > grub_divmod64 (~0ULL - digit, base, 0))
|
||||
{
|
||||
grub_error (GRUB_ERR_OUT_OF_RANGE, "overflow is detected");
|
||||
grub_error (GRUB_ERR_OUT_OF_RANGE,
|
||||
N_("overflow is detected"));
|
||||
return ~0ULL;
|
||||
}
|
||||
|
||||
|
@ -437,7 +438,8 @@ grub_strtoull (const char *str, char **end, int base)
|
|||
|
||||
if (! found)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_NUMBER, "unrecognized number");
|
||||
grub_error (GRUB_ERR_BAD_NUMBER,
|
||||
N_("unrecognized number"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <grub/parser.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/command.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
grub_err_t
|
||||
grub_rescue_parse_line (char *line, grub_reader_getline_t getline)
|
||||
|
@ -63,7 +64,7 @@ grub_rescue_parse_line (char *line, grub_reader_getline_t getline)
|
|||
}
|
||||
else
|
||||
{
|
||||
grub_printf ("Unknown command `%s'\n", name);
|
||||
grub_printf_ (N_("Unknown command `%s'.\n"), name);
|
||||
if (grub_command_find ("help"))
|
||||
grub_printf ("Try `help' for usage\n");
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <grub/err.h>
|
||||
#include <grub/legacy_parse.h>
|
||||
#include <grub/i386/pc/vesa_modes_table.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
struct legacy_command
|
||||
{
|
||||
|
@ -801,7 +802,7 @@ grub_legacy_parse (const char *buf, char **entryname, char **suffix)
|
|||
len = grub_strlen (corig);
|
||||
if (!slash)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid color specification `%s'",
|
||||
grub_error (GRUB_ERR_BAD_ARGUMENT, N_("invalid color specification `%s'"),
|
||||
args[0]);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -241,7 +241,8 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
|
|||
size = grub_file_size (file);
|
||||
if (!size)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_OS, "file is empty");
|
||||
grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"),
|
||||
filename);
|
||||
goto fail;
|
||||
}
|
||||
pages = (((grub_efi_uintn_t) size + ((1 << 12) - 1)) >> 12);
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <grub/env.h>
|
||||
#include <grub/video.h>
|
||||
#include <grub/acpi.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
#if defined (GRUB_MACHINE_EFI)
|
||||
#include <grub/efi/efi.h>
|
||||
|
@ -98,7 +99,7 @@ grub_multiboot_load (grub_file_t file, const char *filename)
|
|||
if (len < 32)
|
||||
{
|
||||
grub_free (buffer);
|
||||
return grub_error (GRUB_ERR_BAD_OS, "file too small");
|
||||
return grub_error (GRUB_ERR_BAD_OS, N_("premature end of file %s"), filename);
|
||||
}
|
||||
|
||||
COMPILE_TIME_ASSERT (MULTIBOOT_HEADER_ALIGN % 4 == 0);
|
||||
|
|
|
@ -361,7 +361,7 @@ grub_cmd_badram (grub_command_t cmd __attribute__ ((unused)),
|
|||
}
|
||||
|
||||
if (argc != 1)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "badram string required");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("one argument expected"));
|
||||
|
||||
grub_dprintf ("badram", "executing badram\n");
|
||||
|
||||
|
|
|
@ -302,7 +302,8 @@ grub_cmd_dhcpopt (struct grub_command *cmd __attribute__ ((unused)),
|
|||
grub_uint8_t taglength;
|
||||
|
||||
if (argc < 4)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "4 arguments expected");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("four arguments expected"));
|
||||
|
||||
FOR_NET_NETWORK_LEVEL_INTERFACES (inter)
|
||||
if (grub_strcmp (inter->name, args[1]) == 0)
|
||||
|
@ -405,7 +406,8 @@ grub_cmd_dhcpopt (struct grub_command *cmd __attribute__ ((unused)),
|
|||
}
|
||||
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
"unrecognised format specification %s", args[3]);
|
||||
N_("unrecognised DHCP option format specification `%s'"),
|
||||
args[3]);
|
||||
}
|
||||
|
||||
/* FIXME: allow to specify mac address. */
|
||||
|
@ -546,7 +548,8 @@ grub_cmd_bootp (struct grub_command *cmd __attribute__ ((unused)),
|
|||
continue;
|
||||
grub_error_push ();
|
||||
grub_net_network_level_interface_unregister (&ifaces[j]);
|
||||
err = grub_error (GRUB_ERR_FILE_NOT_FOUND, "couldn't configure %s",
|
||||
err = grub_error (GRUB_ERR_FILE_NOT_FOUND,
|
||||
N_("couldn't autoconfigure %s"),
|
||||
ifaces[j].card->name);
|
||||
}
|
||||
|
||||
|
|
|
@ -436,7 +436,8 @@ grub_net_dns_lookup (const char *name,
|
|||
}
|
||||
|
||||
if (!n_servers)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "no DNS servers");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("no DNS servers configured"));
|
||||
|
||||
*naddresses = 0;
|
||||
if (cache)
|
||||
|
@ -491,7 +492,7 @@ grub_net_dns_lookup (const char *name,
|
|||
{
|
||||
grub_free (data.name);
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
"domain component is too long");
|
||||
N_("domain name component is too long"));
|
||||
}
|
||||
*optr = (dot - iptr);
|
||||
optr++;
|
||||
|
@ -583,14 +584,16 @@ grub_net_dns_lookup (const char *name,
|
|||
if (*data.naddresses)
|
||||
return GRUB_ERR_NONE;
|
||||
if (data.dns_err)
|
||||
return grub_error (GRUB_ERR_NET_NO_DOMAIN, "no DNS domain found");
|
||||
return grub_error (GRUB_ERR_NET_NO_DOMAIN,
|
||||
N_("no DNS record found"));
|
||||
|
||||
if (err)
|
||||
{
|
||||
grub_errno = err;
|
||||
return err;
|
||||
}
|
||||
return grub_error (GRUB_ERR_TIMEOUT, "no DNS reply received");
|
||||
return grub_error (GRUB_ERR_TIMEOUT,
|
||||
N_("no DNS reply received"));
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
|
|
|
@ -101,7 +101,7 @@ parse_line (grub_file_t file, http_data_t data, char *ptr, grub_size_t len)
|
|||
int code;
|
||||
if (grub_memcmp (ptr, "HTTP/1.1 ", sizeof ("HTTP/1.1 ") - 1) != 0)
|
||||
return grub_error (GRUB_ERR_NET_INVALID_RESPONSE,
|
||||
"unsupported HTTP response");
|
||||
N_("unsupported HTTP response"));
|
||||
ptr += sizeof ("HTTP/1.1 ") - 1;
|
||||
code = grub_strtoul (ptr, &ptr, 10);
|
||||
if (grub_errno)
|
||||
|
@ -112,11 +112,11 @@ parse_line (grub_file_t file, http_data_t data, char *ptr, grub_size_t len)
|
|||
break;
|
||||
case 404:
|
||||
data->err = GRUB_ERR_FILE_NOT_FOUND;
|
||||
data->errmsg = grub_xasprintf ("file `%s' not found", data->filename);
|
||||
data->errmsg = grub_xasprintf (_("file `%s' not found"), data->filename);
|
||||
return GRUB_ERR_NONE;
|
||||
default:
|
||||
data->err = GRUB_ERR_NET_UNKNOWN_ERROR;
|
||||
data->errmsg = grub_xasprintf ("unsupported HTTP error %d: %s",
|
||||
data->errmsg = grub_xasprintf (_("unsupported HTTP error %d: %s"),
|
||||
code, ptr);
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
|
|
@ -191,7 +191,7 @@ grub_net_link_layer_resolve (struct grub_net_network_level_interface *inf,
|
|||
return GRUB_ERR_NONE;
|
||||
}
|
||||
return grub_error (GRUB_ERR_TIMEOUT,
|
||||
"timeout: could not resolve hardware address");
|
||||
N_("timeout: could not resolve hardware address"));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -347,7 +347,8 @@ grub_cmd_ipv6_autoconf (struct grub_command *cmd __attribute__ ((unused)),
|
|||
{
|
||||
if (slaacs[j]->slaac_counter)
|
||||
continue;
|
||||
err = grub_error (GRUB_ERR_FILE_NOT_FOUND, "couldn't configure %s",
|
||||
err = grub_error (GRUB_ERR_FILE_NOT_FOUND,
|
||||
N_("couldn't autoconfigure %s"),
|
||||
ifaces[j]->card->name);
|
||||
}
|
||||
|
||||
|
@ -630,7 +631,8 @@ grub_net_route_address (grub_net_network_level_address_t addr,
|
|||
bestroute = route;
|
||||
}
|
||||
if (bestroute == NULL)
|
||||
return grub_error (GRUB_ERR_NET_NO_ROUTE, "destination unreachable");
|
||||
return grub_error (GRUB_ERR_NET_NO_ROUTE,
|
||||
N_("destination unreachable"));
|
||||
|
||||
if (!bestroute->is_gateway)
|
||||
{
|
||||
|
@ -642,7 +644,8 @@ grub_net_route_address (grub_net_network_level_address_t addr,
|
|||
curtarget = bestroute->gw;
|
||||
}
|
||||
|
||||
return grub_error (GRUB_ERR_NET_ROUTE_LOOP, "route loop detected");
|
||||
return grub_error (GRUB_ERR_NET_ROUTE_LOOP,
|
||||
N_("route loop detected"));
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
|
@ -1168,7 +1171,8 @@ grub_net_open_real (const char *name)
|
|||
}
|
||||
if (!server)
|
||||
{
|
||||
grub_error (GRUB_ERR_NET_BAD_ADDRESS, "no server");
|
||||
grub_error (GRUB_ERR_NET_BAD_ADDRESS,
|
||||
N_("no server is specified"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1198,7 +1202,10 @@ grub_net_open_real (const char *name)
|
|||
return ret;
|
||||
}
|
||||
}
|
||||
grub_error (GRUB_ERR_UNKNOWN_DEVICE, "no such device");
|
||||
|
||||
/* Restore original error. */
|
||||
grub_error (GRUB_ERR_UNKNOWN_DEVICE, N_("disk `%s' not found"),
|
||||
name);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1375,7 +1382,7 @@ grub_net_fs_read_real (grub_file_t file, char *buf, grub_size_t len)
|
|||
else
|
||||
return total;
|
||||
}
|
||||
grub_error (GRUB_ERR_TIMEOUT, "timeout reading '%s'", net->name);
|
||||
grub_error (GRUB_ERR_TIMEOUT, N_("timeout reading '%s'"), net->name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -1488,7 +1495,7 @@ GRUB_MOD_INIT(net)
|
|||
N_("Add a network address."));
|
||||
cmd_slaac = grub_register_command ("net_ipv6_autoconf",
|
||||
grub_cmd_ipv6_autoconf,
|
||||
"[CARD [HWADDRESS]]",
|
||||
N_("[CARD [HWADDRESS]]"),
|
||||
N_("Perform an IPV6 autoconfiguration"));
|
||||
|
||||
cmd_deladdr = grub_register_command ("net_del_addr", grub_cmd_deladdr,
|
||||
|
|
|
@ -657,9 +657,11 @@ grub_net_tcp_open (char *server,
|
|||
{
|
||||
grub_list_remove (GRUB_AS_LIST (socket));
|
||||
if (socket->they_reseted)
|
||||
grub_error (GRUB_ERR_NET_PORT_CLOSED, "port closed");
|
||||
grub_error (GRUB_ERR_NET_PORT_CLOSED,
|
||||
N_("connection refused"));
|
||||
else
|
||||
grub_error (GRUB_ERR_NET_NO_ANSWER, "no answer");
|
||||
grub_error (GRUB_ERR_NET_NO_ANSWER,
|
||||
N_("connection timeout"));
|
||||
|
||||
grub_netbuff_free (nb);
|
||||
destroy_pq (socket);
|
||||
|
|
|
@ -186,7 +186,7 @@ grub_cmd_export (struct grub_command *cmd __attribute__ ((unused)),
|
|||
|
||||
if (argc < 1)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
"no environment variable specified");
|
||||
N_("one argument expected"));
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
grub_env_export (args[i]);
|
||||
|
|
|
@ -373,7 +373,9 @@ menu_init (int entry, grub_menu_t menu, int nested)
|
|||
}
|
||||
}
|
||||
else
|
||||
grub_error (GRUB_ERR_BAD_MODULE, "no gfxmenu found");
|
||||
grub_error (GRUB_ERR_BAD_MODULE,
|
||||
N_("module `%s' isn't loaded"),
|
||||
"gfxmenu");
|
||||
grub_print_error ();
|
||||
grub_wait_after_message ();
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ grub_normal_print_device_info (const char *name)
|
|||
grub_printf (_(" - Partition start at %llu"),
|
||||
(unsigned long long) grub_partition_get_start (dev->disk->partition));
|
||||
if (grub_disk_get_size (dev->disk) == GRUB_DISK_SIZE_UNKNOWN)
|
||||
grub_puts_ (" - Total size unknown");
|
||||
grub_puts_ (N_(" - Total size unknown"));
|
||||
else
|
||||
grub_printf (_(" - Total size %llu sectors"),
|
||||
(unsigned long long) grub_disk_get_size (dev->disk));
|
||||
|
|
|
@ -48,7 +48,7 @@ static grub_err_t grub_pcpart_boot (const grub_device_t dev,
|
|||
struct grub_msdos_partition_mbr mbr;
|
||||
|
||||
if (dev->disk->partition->offset)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "not a primary partition");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("not a primary partition"));
|
||||
|
||||
index = dev->disk->partition->index;
|
||||
part = dev->disk->partition;
|
||||
|
@ -126,7 +126,9 @@ static grub_err_t grub_pcpart_type (const grub_device_t dev,
|
|||
|| grub_msdos_partition_is_extended (type))
|
||||
{
|
||||
dev->disk->partition = part;
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid type");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("the partition type 0x%x isn't "
|
||||
"valid"));
|
||||
}
|
||||
|
||||
mbr.entries[index].type = type;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <grub/lib/arg.h>
|
||||
#include <grub/normal.h>
|
||||
#include <grub/extcmd.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
/* Max digits for a char is 3 (0xFF is 255), similarly for an int it
|
||||
is sizeof (int) * 3, and one extra for a possible -ve sign. */
|
||||
|
@ -157,7 +158,8 @@ grub_script_return (grub_command_t cmd __attribute__((unused)),
|
|||
unsigned long n;
|
||||
|
||||
if (! scope || argc > 1)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "not in function scope");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("not in function scope"));
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
|
@ -297,7 +299,8 @@ static grub_err_t
|
|||
grub_script_env_set (const char *name, const char *val)
|
||||
{
|
||||
if (grub_env_special (name))
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad variable name");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("invalid variable name `%s'"), name);
|
||||
|
||||
return grub_env_set (name, val);
|
||||
}
|
||||
|
@ -579,7 +582,8 @@ grub_script_execute_cmdline (struct grub_script_cmd *cmd)
|
|||
if (argv.argc < 2 || ! argv.args[1])
|
||||
{
|
||||
grub_script_argv_free (&argv);
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "missing arguments");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("no command is specified"));
|
||||
}
|
||||
|
||||
invert = 1;
|
||||
|
@ -644,7 +648,7 @@ grub_script_execute_cmdline (struct grub_script_cmd *cmd)
|
|||
if (ret == GRUB_ERR_TEST_FAILURE)
|
||||
grub_errno = ret = GRUB_ERR_NONE;
|
||||
else if (ret == GRUB_ERR_NONE)
|
||||
ret = grub_error (GRUB_ERR_TEST_FAILURE, "false");
|
||||
ret = grub_error (GRUB_ERR_TEST_FAILURE, N_("false"));
|
||||
else
|
||||
{
|
||||
grub_print_error ();
|
||||
|
|
|
@ -106,7 +106,7 @@ grub_script_function_find (char *functionname)
|
|||
tmp[20] = 0;
|
||||
/* Avoid truncating inside UTF-8 character. */
|
||||
tmp[grub_getend (tmp, tmp + grub_strlen (tmp))] = 0;
|
||||
grub_error (GRUB_ERR_UNKNOWN_COMMAND, "unknown command `%s'", tmp);
|
||||
grub_error (GRUB_ERR_UNKNOWN_COMMAND, N_("can't find command `%s'"), tmp);
|
||||
}
|
||||
|
||||
return func;
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <grub/cpu/io.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/time.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
#ifdef GRUB_MACHINE_PCBIOS
|
||||
#include <grub/machine/memory.h>
|
||||
|
@ -194,19 +195,23 @@ serial_hw_configure (struct grub_serial_port *port,
|
|||
|
||||
divisor = serial_get_divisor (port, config);
|
||||
if (divisor == 0)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad speed");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("unsupported serial port speed"));
|
||||
|
||||
if (config->parity != GRUB_SERIAL_PARITY_NONE
|
||||
&& config->parity != GRUB_SERIAL_PARITY_ODD
|
||||
&& config->parity != GRUB_SERIAL_PARITY_EVEN)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported parity");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("unsupported serial port parity"));
|
||||
|
||||
if (config->stop_bits != GRUB_SERIAL_STOP_BITS_1
|
||||
&& config->stop_bits != GRUB_SERIAL_STOP_BITS_2)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported stop bits");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("unsupported serial port stop bits number"));
|
||||
|
||||
if (config->word_len < 5 || config->word_len > 8)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unsupported word length");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("unsupported serial port word length"));
|
||||
|
||||
port->config = *config;
|
||||
port->configured = 0;
|
||||
|
|
|
@ -184,7 +184,9 @@ grub_cmd_serial (grub_extcmd_context_t ctxt, int argc, char **args)
|
|||
|
||||
port = grub_serial_find (name);
|
||||
if (!port)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unknown serial port");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("serial port `%s' isn't found"),
|
||||
name);
|
||||
|
||||
config = port->config;
|
||||
|
||||
|
@ -203,7 +205,8 @@ grub_cmd_serial (grub_extcmd_context_t ctxt, int argc, char **args)
|
|||
else if (! grub_strcmp (state[4].arg, "even"))
|
||||
config.parity = GRUB_SERIAL_PARITY_EVEN;
|
||||
else
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad parity");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("unsupported serial port parity"));
|
||||
}
|
||||
|
||||
if (state[5].set)
|
||||
|
@ -213,7 +216,8 @@ grub_cmd_serial (grub_extcmd_context_t ctxt, int argc, char **args)
|
|||
else if (! grub_strcmp (state[5].arg, "2"))
|
||||
config.stop_bits = GRUB_SERIAL_STOP_BITS_2;
|
||||
else
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad number of stop bits");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("unsupported serial port stop bits number"));
|
||||
}
|
||||
|
||||
/* Initialize with new settings. */
|
||||
|
|
|
@ -169,7 +169,8 @@ grub_terminfo_set_current (struct grub_term_output *term,
|
|||
return grub_errno;
|
||||
}
|
||||
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "unknown terminfo type");
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("unknown terminfo type `%s'"),
|
||||
str);
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
|
@ -664,7 +665,7 @@ grub_cmd_terminfo (grub_extcmd_context_t ctxt, int argc, char **args)
|
|||
return grub_errno;
|
||||
if (*ptr != 'x')
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
"incorrect geometry specification");
|
||||
N_("incorrect terminal dimensions specification"));
|
||||
ptr++;
|
||||
h = grub_strtoul (ptr, &ptr, 0);
|
||||
if (grub_errno)
|
||||
|
@ -694,7 +695,7 @@ grub_cmd_terminfo (grub_extcmd_context_t ctxt, int argc, char **args)
|
|||
}
|
||||
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
"no terminal %s found or it's not handled by terminfo",
|
||||
N_("terminal %s isn't found or it's not handled by terminfo"),
|
||||
args[0]);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <grub/dl.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
|
@ -202,7 +203,9 @@ grub_video_bitmap_load (struct grub_video_bitmap **bitmap,
|
|||
reader = reader->next;
|
||||
}
|
||||
|
||||
return grub_error (GRUB_ERR_BAD_FILE_TYPE, "unsupported bitmap format");
|
||||
return grub_error (GRUB_ERR_BAD_FILE_TYPE,
|
||||
N_("bitmap file `%s' is of"
|
||||
" unsupported format"), filename);
|
||||
}
|
||||
|
||||
/* Return bitmap width. */
|
||||
|
|
|
@ -773,7 +773,7 @@ grub_cmd_jpegtest (grub_command_t cmd __attribute__ ((unused)),
|
|||
struct grub_video_bitmap *bitmap = 0;
|
||||
|
||||
if (argc != 1)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("file name expected"));
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
|
||||
|
||||
grub_video_reader_jpeg (&bitmap, args[0]);
|
||||
if (grub_errno != GRUB_ERR_NONE)
|
||||
|
|
|
@ -541,7 +541,7 @@ grub_video_set_mode (const char *modestring,
|
|||
grub_free (modevar);
|
||||
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
"no suitable mode found");
|
||||
N_("no suitable video mode found"));
|
||||
}
|
||||
|
||||
/* Skip separator. */
|
||||
|
@ -705,7 +705,7 @@ grub_video_set_mode (const char *modestring,
|
|||
grub_free (modevar);
|
||||
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
"no suitable mode found");
|
||||
N_("no suitable video mode found"));
|
||||
}
|
||||
|
||||
/* Initialize Video API module. */
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <grub/types.h>
|
||||
#include <grub/symbol.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
/* GCC version checking borrowed from glibc. */
|
||||
#if defined(__GNUC__) && defined(__GNUC_MINOR__)
|
||||
|
@ -285,7 +286,7 @@ grub_strtol (const char *str, char **end, int base)
|
|||
{
|
||||
if (magnitude > (unsigned long) GRUB_LONG_MAX + 1)
|
||||
{
|
||||
grub_error (GRUB_ERR_OUT_OF_RANGE, "overflow is detected");
|
||||
grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected"));
|
||||
return GRUB_LONG_MIN;
|
||||
}
|
||||
return -((long) magnitude);
|
||||
|
@ -294,7 +295,7 @@ grub_strtol (const char *str, char **end, int base)
|
|||
{
|
||||
if (magnitude > GRUB_LONG_MAX)
|
||||
{
|
||||
grub_error (GRUB_ERR_OUT_OF_RANGE, "overflow is detected");
|
||||
grub_error (GRUB_ERR_OUT_OF_RANGE, N_("overflow is detected"));
|
||||
return GRUB_LONG_MAX;
|
||||
}
|
||||
return (long) magnitude;
|
||||
|
|
|
@ -50,7 +50,7 @@ execute_command (const char *name, int n, char **args)
|
|||
|
||||
cmd = grub_command_find (name);
|
||||
if (! cmd)
|
||||
grub_util_error (_("can\'t find command %s"), name);
|
||||
grub_util_error (_("can't find command `%s'"), name);
|
||||
|
||||
return (cmd->func) (cmd, n, args);
|
||||
}
|
||||
|
|
|
@ -938,7 +938,7 @@ SUFFIX (load_image) (const char *kernel_path, grub_size_t *exec_size,
|
|||
num_sections = grub_target_to_host16 (e->e_shnum);
|
||||
|
||||
if (kernel_size < section_offset + section_entsize * num_sections)
|
||||
grub_util_error ("invalid ELF format");
|
||||
grub_util_error (_("premature end of file %s"), kernel_path);
|
||||
|
||||
sections = (Elf_Shdr *) (kernel_img + section_offset);
|
||||
|
||||
|
@ -1025,7 +1025,7 @@ SUFFIX (load_image) (const char *kernel_path, grub_size_t *exec_size,
|
|||
#endif
|
||||
|
||||
if (! symtab_section)
|
||||
grub_util_error ("no symbol table");
|
||||
grub_util_error ("%s", _("no symbol table"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -61,7 +61,7 @@ execute_command (const char *name, int n, char **args)
|
|||
|
||||
cmd = grub_command_find (name);
|
||||
if (! cmd)
|
||||
grub_util_error (_("can\'t find command %s"), name);
|
||||
grub_util_error (_("can't find command `%s'"), name);
|
||||
|
||||
return (cmd->func) (cmd, n, args);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue