* util/grub-fstest.c: Fix several printf formats.

* util/grub-mkimage.c: Likewise.
	* util/grub-mkimagexx.c: Likewise.
	* util/grub-script-check.c: Likewise.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-08-23 09:01:11 +02:00
parent 64463dfde4
commit f163045985
5 changed files with 27 additions and 18 deletions

View file

@ -1,3 +1,10 @@
2013-08-23 Vladimir Serbinenko <phcoder@gmail.com>
* 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 <phcoder@gmail.com> 2013-08-23 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/lib/xzembed/xz_dec_lzma2.c: Make -Wattributes not cause * grub-core/lib/xzembed/xz_dec_lzma2.c: Make -Wattributes not cause

View file

@ -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; len = (leng > BUF_SIZE) ? BUF_SIZE : leng;
if (grub_disk_read (dev->disk, 0, skip, len, buf)) if (grub_disk_read (dev->disk, 0, skip, len, buf))
grub_util_error (_("disk read fails at offset %lld, length %d"), grub_util_error (_("disk read fails at offset %lld, length %lld"),
skip, len); (long long) skip, (long long) len);
if (hook (skip, buf, len, hook_arg)) if (hook (skip, buf, len, hook_arg))
break; 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); sz = grub_file_read (file, buf, (len > BUF_SIZE) ? BUF_SIZE : len);
if (sz < 0) if (sz < 0)
{ {
grub_util_error (_("read error at offset %llu: %s"), ofs, grub_util_error (_("read error at offset %llu: %s"),
grub_errmsg); (unsigned long long) ofs, grub_errmsg);
break; break;
} }
@ -238,8 +238,8 @@ cmp_hook (grub_off_t ofs, char *buf, int len, void *ff_in)
static char buf_1[BUF_SIZE]; static char buf_1[BUF_SIZE];
if ((int) fread (buf_1, 1, len, ff) != len) if ((int) fread (buf_1, 1, len, ff) != len)
{ {
grub_util_error (_("read error at offset %llu: %s"), ofs, grub_util_error (_("read error at offset %llu: %s"),
grub_errmsg); (unsigned long long) ofs, grub_errmsg);
return 1; 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++) for (i = 0; i < len; i++, ofs++)
if (buf_1[i] != buf[i]) 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; return 1;
} }
} }

View file

@ -1077,14 +1077,15 @@ generate_image (const char *dir, const char *prefix,
|| (core_size > (0xffff << GRUB_DISK_SECTOR_BITS)) || (core_size > (0xffff << GRUB_DISK_SECTOR_BITS))
|| (kernel_size + bss_size + GRUB_KERNEL_I386_PC_LINK_ADDR > 0x68000)) || (kernel_size + bss_size + GRUB_KERNEL_I386_PC_LINK_ADDR > 0x68000))
grub_util_error (_("core image is too big (0x%x > 0x%x)"), 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); 0x78000);
/* fallthrough */ /* fallthrough */
case IMAGE_COREBOOT: case IMAGE_COREBOOT:
case IMAGE_QEMU: case IMAGE_QEMU:
if (kernel_size + bss_size + GRUB_KERNEL_I386_PC_LINK_ADDR > 0x68000) if (kernel_size + bss_size + GRUB_KERNEL_I386_PC_LINK_ADDR > 0x68000)
grub_util_error (_("kernel image is too big (0x%x > 0x%x)"), 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); 0x68000);
break; break;
case IMAGE_LOONGSON_ELF: case IMAGE_LOONGSON_ELF:

View file

@ -286,8 +286,8 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections,
(unsigned long long) offset); (unsigned long long) offset);
break; break;
default: default:
grub_util_error (_("relocation 0x%x is not implemented yet"), grub_util_error (_("relocation 0x%llx is not implemented yet"),
ELF_R_TYPE (info)); (unsigned long long) ELF_R_TYPE (info));
break; break;
} }
break; break;
@ -331,8 +331,8 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections,
} }
default: default:
grub_util_error (_("relocation 0x%x is not implemented yet"), grub_util_error (_("relocation 0x%llx is not implemented yet"),
ELF_R_TYPE (info)); (unsigned long long) ELF_R_TYPE (info));
break; break;
} }
break; break;
@ -404,8 +404,8 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections,
break; break;
default: default:
grub_util_error (_("relocation 0x%x is not implemented yet"), grub_util_error (_("relocation 0x%llx is not implemented yet"),
ELF_R_TYPE (info)); (unsigned long long) ELF_R_TYPE (info));
break; break;
} }
break; break;
@ -681,8 +681,8 @@ SUFFIX (make_reloc_section) (Elf_Ehdr *e, void **out,
#endif #endif
break; break;
default: default:
grub_util_error (_("relocation 0x%x is not implemented yet"), grub_util_error (_("relocation 0x%llx is not implemented yet"),
ELF_R_TYPE (info)); (unsigned long long) ELF_R_TYPE (info));
break; break;
} }
break; break;

View file

@ -206,7 +206,7 @@ main (int argc, char *argv[])
} }
if (! found_cmd) 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); ctx.arguments.filename);
return 1; return 1;
} }