Improve gettext support. Stylistic fixes and error handling fixes while

on it.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-02-08 19:26:01 +01:00
parent 215c90cb82
commit 9c4b5c13e6
184 changed files with 1175 additions and 959 deletions

View file

@ -534,12 +534,11 @@ grub_cmd_devprop_load (grub_command_t cmd __attribute__ ((unused)),
unsigned i, j;
if (argc != 1)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "file name required");
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
file = grub_file_open (args[0]);
if (! file)
return grub_error (GRUB_ERR_FILE_NOT_FOUND,
"couldn't load device-properties dump");
return grub_errno;
size = grub_file_size (file);
buf = grub_malloc (size);
if (!buf)
@ -849,7 +848,6 @@ static grub_err_t
grub_xnu_set_video (struct grub_xnu_boot_params *params)
{
struct grub_video_mode_info mode_info;
int ret;
char *tmp;
const char *modevar;
void *framebuffer;
@ -878,9 +876,9 @@ grub_xnu_set_video (struct grub_xnu_boot_params *params)
if (err)
return err;
ret = grub_video_get_info (&mode_info);
if (ret)
return grub_error (GRUB_ERR_IO, "couldn't retrieve video parameters");
err = grub_video_get_info (&mode_info);
if (err)
return err;
if (grub_xnu_bitmap)
{
@ -932,9 +930,9 @@ grub_xnu_set_video (struct grub_xnu_boot_params *params)
bitmap = 0;
}
ret = grub_video_get_info_and_fini (&mode_info, &framebuffer);
if (ret)
return grub_error (GRUB_ERR_IO, "couldn't retrieve video parameters");
err = grub_video_get_info_and_fini (&mode_info, &framebuffer);
if (err)
return err;
params->lfb_width = mode_info.width;
params->lfb_height = mode_info.height;
@ -1129,7 +1127,10 @@ grub_cpu_xnu_init (void)
{
cmd_devprop_load = grub_register_command ("xnu_devprop_load",
grub_cmd_devprop_load,
0, N_("Load device-properties dump."));
/* TRANSLATORS: `device-properties'
is a variable name,
not a program. */
0, N_("Load `device-properties' dump."));
}
void