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
|
@ -294,15 +294,15 @@ vendor_is_ATA(const char *path)
|
|||
|
||||
bufname = xmalloc (path_size);
|
||||
|
||||
snprintf(bufname, path_size, "%s/vendor", path);
|
||||
fd = open(bufname, O_RDONLY);
|
||||
snprintf (bufname, path_size, "%s/vendor", path);
|
||||
fd = open (bufname, O_RDONLY);
|
||||
if (fd < 0)
|
||||
grub_util_error (_("cannot open 'vendor' node of `%s'"), path);
|
||||
grub_util_error (_("cannot open `%s': %s"), bufname, strerror (errno));
|
||||
|
||||
memset(bufcont, 0, sizeof (bufcont));
|
||||
err = read(fd, bufcont, sizeof (bufcont));
|
||||
if (err < 0)
|
||||
grub_util_error (_("cannot read 'vendor' node of `%s'"), path);
|
||||
grub_util_error (_("cannot open `%s': %s"), bufname, strerror (errno));
|
||||
|
||||
close(fd);
|
||||
free (bufname);
|
||||
|
@ -336,9 +336,9 @@ check_sas (char *sysfs_path, int *tgt)
|
|||
path = xmalloc (path_size);
|
||||
snprintf (path, path_size, "%s/sas_device:%s/phy_identifier", p, ed);
|
||||
|
||||
fd = open(path, O_RDONLY);
|
||||
fd = open (path, O_RDONLY);
|
||||
if (fd < 0)
|
||||
grub_util_error(_("cannot open SAS PHY ID `%s'\n"), path);
|
||||
grub_util_error (_("cannot open `%s': %s"), path, strerror (errno));
|
||||
|
||||
memset (phy, 0, sizeof (phy));
|
||||
read (fd, phy, sizeof (phy));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue