From 5082ea618439fe59956d071777be0c9c74fbbcf5 Mon Sep 17 00:00:00 2001 From: Andrei Borzenkov Date: Wed, 13 May 2015 09:47:17 +0300 Subject: [PATCH] remove extra newlines in grub_util_* strings grub_util_{info,warn,error} already add trailing newlines, so remove them from format strings. Also trailing full stops are already added. --- grub-core/bus/emu/pci.c | 2 +- grub-core/disk/lvm.c | 40 +++++++++++++++++----------------- grub-core/osdep/linux/ofpath.c | 2 +- util/grub-install-common.c | 2 +- util/grub-install.c | 6 ++--- util/grub-mknetdir.c | 2 +- util/grub-pe2elf.c | 2 +- util/mkimage.c | 4 ++-- 8 files changed, 30 insertions(+), 30 deletions(-) diff --git a/grub-core/bus/emu/pci.c b/grub-core/bus/emu/pci.c index 663e5540c..267f2622d 100644 --- a/grub-core/bus/emu/pci.c +++ b/grub-core/bus/emu/pci.c @@ -55,7 +55,7 @@ grub_pci_device_map_range (grub_pci_device_t dev, grub_addr_t base, int err; err = pci_device_map_range (dev, base, size, PCI_DEV_MAP_FLAG_WRITABLE, &addr); if (err) - grub_util_error ("mapping 0x%llx failed (error %d)\n", + grub_util_error ("mapping 0x%llx failed (error %d)", (unsigned long long) base, err); return addr; } diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c index 9b97004d8..7b265c780 100644 --- a/grub-core/disk/lvm.c +++ b/grub-core/disk/lvm.c @@ -160,7 +160,7 @@ grub_lvm_detect (grub_disk_t disk, "we don't support multiple LVM data areas"); #ifdef GRUB_UTIL - grub_util_info ("we don't support multiple LVM data areas\n"); + grub_util_info ("we don't support multiple LVM data areas"); #endif goto fail; } @@ -189,7 +189,7 @@ grub_lvm_detect (grub_disk_t disk, grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "unknown LVM metadata header"); #ifdef GRUB_UTIL - grub_util_info ("unknown LVM metadata header\n"); + grub_util_info ("unknown LVM metadata header"); #endif goto fail2; } @@ -213,7 +213,7 @@ grub_lvm_detect (grub_disk_t disk, if (q == metadatabuf + mda_size) { #ifdef GRUB_UTIL - grub_util_info ("error parsing metadata\n"); + grub_util_info ("error parsing metadata"); #endif goto fail2; } @@ -230,7 +230,7 @@ grub_lvm_detect (grub_disk_t disk, if (p == NULL) { #ifdef GRUB_UTIL - grub_util_info ("couldn't find ID\n"); + grub_util_info ("couldn't find ID"); #endif goto fail3; } @@ -258,7 +258,7 @@ grub_lvm_detect (grub_disk_t disk, if (p == NULL) { #ifdef GRUB_UTIL - grub_util_info ("unknown extent size\n"); + grub_util_info ("unknown extent size"); #endif goto fail4; } @@ -306,7 +306,7 @@ grub_lvm_detect (grub_disk_t disk, if (p == NULL) { #ifdef GRUB_UTIL - grub_util_info ("unknown pe_start\n"); + grub_util_info ("unknown pe_start"); #endif goto pvs_fail; } @@ -315,7 +315,7 @@ grub_lvm_detect (grub_disk_t disk, if (p == NULL) { #ifdef GRUB_UTIL - grub_util_info ("error parsing pe_start\n"); + grub_util_info ("error parsing pe_start"); #endif goto pvs_fail; } @@ -402,7 +402,7 @@ grub_lvm_detect (grub_disk_t disk, if (p == NULL) { #ifdef GRUB_UTIL - grub_util_info ("couldn't find ID\n"); + grub_util_info ("couldn't find ID"); #endif goto lvs_fail; } @@ -422,7 +422,7 @@ grub_lvm_detect (grub_disk_t disk, if (p == NULL) { #ifdef GRUB_UTIL - grub_util_info ("unknown segment_count\n"); + grub_util_info ("unknown segment_count"); #endif goto lvs_fail; } @@ -436,7 +436,7 @@ grub_lvm_detect (grub_disk_t disk, if (p == NULL) { #ifdef GRUB_UTIL - grub_util_info ("unknown segment\n"); + grub_util_info ("unknown segment"); #endif goto lvs_segment_fail; } @@ -445,7 +445,7 @@ grub_lvm_detect (grub_disk_t disk, if (p == NULL) { #ifdef GRUB_UTIL - grub_util_info ("unknown start_extent\n"); + grub_util_info ("unknown start_extent"); #endif goto lvs_segment_fail; } @@ -453,7 +453,7 @@ grub_lvm_detect (grub_disk_t disk, if (p == NULL) { #ifdef GRUB_UTIL - grub_util_info ("unknown extent_count\n"); + grub_util_info ("unknown extent_count"); #endif goto lvs_segment_fail; } @@ -475,7 +475,7 @@ grub_lvm_detect (grub_disk_t disk, if (p == NULL) { #ifdef GRUB_UTIL - grub_util_info ("unknown stripe_count\n"); + grub_util_info ("unknown stripe_count"); #endif goto lvs_segment_fail; } @@ -491,7 +491,7 @@ grub_lvm_detect (grub_disk_t disk, if (p == NULL) { #ifdef GRUB_UTIL - grub_util_info ("unknown stripes\n"); + grub_util_info ("unknown stripes"); #endif goto lvs_segment_fail2; } @@ -533,7 +533,7 @@ grub_lvm_detect (grub_disk_t disk, if (p == NULL) { #ifdef GRUB_UTIL - grub_util_info ("unknown mirror_count\n"); + grub_util_info ("unknown mirror_count"); #endif goto lvs_segment_fail; } @@ -545,7 +545,7 @@ grub_lvm_detect (grub_disk_t disk, if (p == NULL) { #ifdef GRUB_UTIL - grub_util_info ("unknown mirrors\n"); + grub_util_info ("unknown mirrors"); #endif goto lvs_segment_fail2; } @@ -607,7 +607,7 @@ grub_lvm_detect (grub_disk_t disk, if (p == NULL) { #ifdef GRUB_UTIL - grub_util_info ("unknown device_count\n"); + grub_util_info ("unknown device_count"); #endif goto lvs_segment_fail; } @@ -618,7 +618,7 @@ grub_lvm_detect (grub_disk_t disk, if (p == NULL) { #ifdef GRUB_UTIL - grub_util_info ("unknown stripe_size\n"); + grub_util_info ("unknown stripe_size"); #endif goto lvs_segment_fail; } @@ -631,7 +631,7 @@ grub_lvm_detect (grub_disk_t disk, if (p == NULL) { #ifdef GRUB_UTIL - grub_util_info ("unknown raids\n"); + grub_util_info ("unknown raids"); #endif goto lvs_segment_fail2; } @@ -678,7 +678,7 @@ grub_lvm_detect (grub_disk_t disk, p2 = grub_strchr (p, '"'); if (p2) *p2 = 0; - grub_util_info ("unknown LVM type %s\n", p); + grub_util_info ("unknown LVM type %s", p); if (p2) *p2 ='"'; #endif diff --git a/grub-core/osdep/linux/ofpath.c b/grub-core/osdep/linux/ofpath.c index 05b1ecdf8..a79682a5e 100644 --- a/grub-core/osdep/linux/ofpath.c +++ b/grub-core/osdep/linux/ofpath.c @@ -539,7 +539,7 @@ grub_util_devname_to_ofpath (const char *sys_devname) ofpath = xstrdup ("floppy"); else { - grub_util_warn (_("unknown device type %s\n"), device); + grub_util_warn (_("unknown device type %s"), device); ofpath = NULL; } diff --git a/util/grub-install-common.c b/util/grub-install-common.c index 0364b327c..25983089f 100644 --- a/util/grub-install-common.c +++ b/util/grub-install-common.c @@ -494,7 +494,7 @@ grub_install_make_image_wrap_file (const char *dir, const char *prefix, tgt = grub_install_get_image_target (mkimage_target); if (!tgt) - grub_util_error (_("unknown target format %s\n"), mkimage_target); + grub_util_error (_("unknown target format %s"), mkimage_target); grub_install_generate_image (dir, prefix, fp, outname, modules.entries, memdisk_path, diff --git a/util/grub-install.c b/util/grub-install.c index 7b394c997..566272600 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -773,7 +773,7 @@ bless (grub_device_t dev, const char *path, int x86) err = grub_mac_bless_inode (dev, st.st_ino, S_ISDIR (st.st_mode), x86); if (err) grub_util_error ("%s", grub_errmsg); - grub_util_info ("blessed\n"); + grub_util_info ("blessed"); } static void @@ -1070,7 +1070,7 @@ main (int argc, char *argv[]) efidir_is_mac = 1; if (!efidir_is_mac && grub_strcmp (fs->name, "fat") != 0) - grub_util_error (_("%s doesn't look like an EFI partition.\n"), efidir); + grub_util_error (_("%s doesn't look like an EFI partition"), efidir); /* The EFI specification requires that an EFI System Partition must contain an "EFI" subdirectory, and that OS loaders are stored in @@ -1271,7 +1271,7 @@ main (int argc, char *argv[]) if (!config.is_cryptodisk_enabled && have_cryptodisk) grub_util_error (_("attempt to install to encrypted disk without cryptodisk enabled. " - "Set `%s' in file `%s'."), "GRUB_ENABLE_CRYPTODISK=y", + "Set `%s' in file `%s'"), "GRUB_ENABLE_CRYPTODISK=y", grub_util_get_config_filename ()); if (disk_module && grub_strcmp (disk_module, "ata") == 0) diff --git a/util/grub-mknetdir.c b/util/grub-mknetdir.c index 8366a1121..3813e8bc0 100644 --- a/util/grub-mknetdir.c +++ b/util/grub-mknetdir.c @@ -140,7 +140,7 @@ process_input_dir (const char *input_dir, enum grub_install_plat platform) prefix = xasprintf ("/%s", subdir); if (!targets[platform].mkimage_target) - grub_util_error (_("unsupported platform %s\n"), platsub); + grub_util_error (_("unsupported platform %s"), platsub); grub_cfg = grub_util_path_concat (2, grubdir, "grub.cfg"); cfg = grub_util_fopen (grub_cfg, "wb"); diff --git a/util/grub-pe2elf.c b/util/grub-pe2elf.c index f4abf70a3..0d4084a10 100644 --- a/util/grub-pe2elf.c +++ b/util/grub-pe2elf.c @@ -279,7 +279,7 @@ write_reloc_section (FILE* fp, const char *name, char *image, break; #endif default: - grub_util_error ("unknown pe relocation type %d\n", pe_rel->type); + grub_util_error ("unknown pe relocation type %d", pe_rel->type); } if (type == diff --git a/util/mkimage.c b/util/mkimage.c index 52265b557..35df99871 100644 --- a/util/mkimage.c +++ b/util/mkimage.c @@ -823,7 +823,7 @@ compress_kernel (const struct grub_install_image_target_desc *image_target, char if (image_target->flags & PLATFORM_FLAGS_DECOMPRESSORS && (comp != GRUB_COMPRESSION_NONE)) - grub_util_error (_("unknown compression %d\n"), comp); + grub_util_error (_("unknown compression %d"), comp); *core_img = xmalloc (kernel_size); memcpy (*core_img, kernel_img, kernel_size); @@ -1234,7 +1234,7 @@ grub_install_generate_image (const char *dir, const char *prefix, name = "none_decompress.img"; break; default: - grub_util_error (_("unknown compression %d\n"), comp); + grub_util_error (_("unknown compression %d"), comp); } decompress_path = grub_util_get_path (dir, name);