Improve and unify messages.
* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors): Add argument name. All users updated. Print filename in error. (read_device_map): Print filename in error. * util/getroot.c (grub_guess_root_devices): Print filename in error. (grub_util_get_os_disk): Likewise. (grub_util_biosdisk_get_grub_dev): Likewise. (grub_util_check_block_device): Likewise. (grub_util_check_char_device): Likewise. (grub_make_system_path_relative_to_its_root): Likewise. * util/grub-editenv.c (create_envblk_file): Likewise. (open_envblk_file): Likewise. (write_envblk): Likewise. * util/grub-fstest.c (cmd_cp): Likewise. (cmd_cat): Likewise. (cmd_cmp): Likewise. * util/grub-menulst2cfg.c (main): Likewise. * util/grub-mkfont.c (write_font_ascii_bitmap): Likewise. (write_font_width_spec): Likewise. (write_font_pf2): Likewise. * util/grub-mkimage.c (generate_image): New argument outname. All users updated. Remove unreacheable message. (options): Unify messages. (help_filter): Likewise. * util/grub-mklayout.c (usage): Removed (unused). (main): Print filename in error. * util/grub-mkrescue.in: Fix wrong quoting. * util/grub-setup.c (setup): Print filename in error. * util/ieee1275/ofpath.c (vendor_is_ATA): Likewise. (check_sas): Likewise. * util/misc.c (grub_util_get_fp_size): Removed. (grub_util_get_image_size): Print filename in error. (grub_util_read_at): Removed. (grub_util_read_image): Print filename in error. (grub_util_load_image): Likewise. (grub_util_write_image_at): New argument filename. All users updated. Print filename in error. (grub_util_write_image): New argument filename. All users updated. Print filename in error. * util/raid.c (grub_util_raid_getmembers): Print filename in error. * util/resolve.c (grub_util_resolve_dependencies): Likewise.
This commit is contained in:
parent
0a96117de7
commit
0ae70393ba
19 changed files with 222 additions and 166 deletions
|
@ -264,20 +264,6 @@ static grub_uint8_t linux_to_usb_map[128] = {
|
|||
/* 0x6e */ GRUB_KEYBOARD_KEY_INSERT, GRUB_KEYBOARD_KEY_DELETE
|
||||
};
|
||||
|
||||
static void
|
||||
usage (int status)
|
||||
{
|
||||
if (status)
|
||||
fprintf (stderr, _("Try `%s --help' for more information.\n"), program_name);
|
||||
else
|
||||
printf (_("\
|
||||
Usage: %s [OPTIONS]\n\
|
||||
\n\
|
||||
Report bugs to <%s>.\n"), program_name, PACKAGE_BUGREPORT);
|
||||
|
||||
exit (status);
|
||||
}
|
||||
|
||||
static void
|
||||
add_special_keys (struct grub_keyboard_layout *layout)
|
||||
{
|
||||
|
@ -484,7 +470,8 @@ main (int argc, char *argv[])
|
|||
in = stdin;
|
||||
|
||||
if (!in)
|
||||
grub_util_error (_("Couldn't open input file: %s\n"), strerror (errno));
|
||||
grub_util_error (_("cannot open `%s': %s"), arguments.input ? : "stdin",
|
||||
strerror (errno));
|
||||
|
||||
if (arguments.output)
|
||||
out = fopen (arguments.output, "wb");
|
||||
|
@ -495,7 +482,8 @@ main (int argc, char *argv[])
|
|||
{
|
||||
if (in != stdin)
|
||||
fclose (in);
|
||||
grub_util_error (_("Couldn't open output file: %s\n"), strerror (errno));
|
||||
grub_util_error (_("cannot open `%s': %s"), arguments.output ? : "stdout",
|
||||
strerror (errno));
|
||||
}
|
||||
|
||||
write_keymaps (in, out);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue