diff --git a/ChangeLog b/ChangeLog index 5046ad777..5afeded9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-08-23 Vladimir Serbinenko + + * util/grub-fstest.c: Fix several printf formats. + * util/grub-mkimage.c: Likewise. + * util/grub-mkimagexx.c: Likewise. + * util/grub-script-check.c: Likewise. + 2013-08-23 Vladimir Serbinenko * grub-core/lib/xzembed/xz_dec_lzma2.c: Make -Wattributes not cause diff --git a/util/grub-fstest.c b/util/grub-fstest.c index 47561ce81..4ab91d8a0 100644 --- a/util/grub-fstest.c +++ b/util/grub-fstest.c @@ -105,8 +105,8 @@ read_file (char *pathname, int (*hook) (grub_off_t ofs, char *buf, int len, void len = (leng > BUF_SIZE) ? BUF_SIZE : leng; if (grub_disk_read (dev->disk, 0, skip, len, buf)) - grub_util_error (_("disk read fails at offset %lld, length %d"), - skip, len); + grub_util_error (_("disk read fails at offset %lld, length %lld"), + (long long) skip, (long long) len); if (hook (skip, buf, len, hook_arg)) break; @@ -153,8 +153,8 @@ read_file (char *pathname, int (*hook) (grub_off_t ofs, char *buf, int len, void sz = grub_file_read (file, buf, (len > BUF_SIZE) ? BUF_SIZE : len); if (sz < 0) { - grub_util_error (_("read error at offset %llu: %s"), ofs, - grub_errmsg); + grub_util_error (_("read error at offset %llu: %s"), + (unsigned long long) ofs, grub_errmsg); break; } @@ -238,8 +238,8 @@ cmp_hook (grub_off_t ofs, char *buf, int len, void *ff_in) static char buf_1[BUF_SIZE]; if ((int) fread (buf_1, 1, len, ff) != len) { - grub_util_error (_("read error at offset %llu: %s"), ofs, - grub_errmsg); + grub_util_error (_("read error at offset %llu: %s"), + (unsigned long long) ofs, grub_errmsg); return 1; } @@ -250,7 +250,8 @@ cmp_hook (grub_off_t ofs, char *buf, int len, void *ff_in) for (i = 0; i < len; i++, ofs++) if (buf_1[i] != buf[i]) { - grub_util_error (_("compare fail at offset %llu"), ofs); + grub_util_error (_("compare fail at offset %llu"), + (unsigned long long) ofs); return 1; } } diff --git a/util/grub-mkimage.c b/util/grub-mkimage.c index c5a0c7a9d..61e06a09b 100644 --- a/util/grub-mkimage.c +++ b/util/grub-mkimage.c @@ -1077,14 +1077,15 @@ generate_image (const char *dir, const char *prefix, || (core_size > (0xffff << GRUB_DISK_SECTOR_BITS)) || (kernel_size + bss_size + GRUB_KERNEL_I386_PC_LINK_ADDR > 0x68000)) grub_util_error (_("core image is too big (0x%x > 0x%x)"), - GRUB_KERNEL_I386_PC_LINK_ADDR + core_size, + GRUB_KERNEL_I386_PC_LINK_ADDR + (unsigned) core_size, 0x78000); /* fallthrough */ case IMAGE_COREBOOT: case IMAGE_QEMU: if (kernel_size + bss_size + GRUB_KERNEL_I386_PC_LINK_ADDR > 0x68000) grub_util_error (_("kernel image is too big (0x%x > 0x%x)"), - kernel_size + bss_size + GRUB_KERNEL_I386_PC_LINK_ADDR, + (unsigned) kernel_size + (unsigned) bss_size + + GRUB_KERNEL_I386_PC_LINK_ADDR, 0x68000); break; case IMAGE_LOONGSON_ELF: diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c index 0f4464084..e777cf3e1 100644 --- a/util/grub-mkimagexx.c +++ b/util/grub-mkimagexx.c @@ -286,8 +286,8 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections, (unsigned long long) offset); break; default: - grub_util_error (_("relocation 0x%x is not implemented yet"), - ELF_R_TYPE (info)); + grub_util_error (_("relocation 0x%llx is not implemented yet"), + (unsigned long long) ELF_R_TYPE (info)); break; } break; @@ -331,8 +331,8 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections, } default: - grub_util_error (_("relocation 0x%x is not implemented yet"), - ELF_R_TYPE (info)); + grub_util_error (_("relocation 0x%llx is not implemented yet"), + (unsigned long long) ELF_R_TYPE (info)); break; } break; @@ -404,8 +404,8 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections, break; default: - grub_util_error (_("relocation 0x%x is not implemented yet"), - ELF_R_TYPE (info)); + grub_util_error (_("relocation 0x%llx is not implemented yet"), + (unsigned long long) ELF_R_TYPE (info)); break; } break; @@ -681,8 +681,8 @@ SUFFIX (make_reloc_section) (Elf_Ehdr *e, void **out, #endif break; default: - grub_util_error (_("relocation 0x%x is not implemented yet"), - ELF_R_TYPE (info)); + grub_util_error (_("relocation 0x%llx is not implemented yet"), + (unsigned long long) ELF_R_TYPE (info)); break; } break; diff --git a/util/grub-script-check.c b/util/grub-script-check.c index 0d0a83cb6..d5e878391 100644 --- a/util/grub-script-check.c +++ b/util/grub-script-check.c @@ -206,7 +206,7 @@ main (int argc, char *argv[]) } if (! found_cmd) { - fprintf (stderr, _("Script contains no commands and will do nothing\n"), + fprintf (stderr, _("Script `%s' contains no commands and will do nothing\n"), ctx.arguments.filename); return 1; }