]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* util/grub-fstest.c: Fix several printf formats.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 23 Aug 2013 07:01:11 +0000 (09:01 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 23 Aug 2013 07:01:11 +0000 (09:01 +0200)
* util/grub-mkimage.c: Likewise.
* util/grub-mkimagexx.c: Likewise.
* util/grub-script-check.c: Likewise.

ChangeLog
util/grub-fstest.c
util/grub-mkimage.c
util/grub-mkimagexx.c
util/grub-script-check.c

index 5046ad77714baa9ac6925460513c490256a2d46f..5afeded9cb5f86ab28007ba0104621746ea5cfeb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        * grub-core/lib/xzembed/xz_dec_lzma2.c: Make -Wattributes not cause
index 47561ce8155d6c2091f380fed248abb703cb5dc5..4ab91d8a08717b3b8ec109f107138d1ba9837a4e 100644 (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;
 
           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;
          }
     }
index c5a0c7a9d23700489b6c78b357e110e8d4c83353..61e06a09b1fdf4c1e36a02279f684ed7f419144e 100644 (file)
@@ -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:
index 0f44640845673c59a52ebb4c3c6663f379ba5d6e..e777cf3e1723ddccde2683297748df60f56e8970 100644 (file)
@@ -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;
index 0d0a83cb608884de0e99114e51bfc4588d803b3c..d5e87839161cd80279650cf8660d778a96660950 100644 (file)
@@ -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;
     }