]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: Fix printf() format string in kvm__load_firmware()
authorJean-Philippe Menil <jean-philippe.menil@univ-nantes.fr>
Tue, 8 May 2012 13:48:15 +0000 (15:48 +0200)
committerPekka Enberg <penberg@kernel.org>
Tue, 8 May 2012 14:11:26 +0000 (17:11 +0300)
Fixes the following build breakage with '-Werror':

  cc1: warnings being treated as errors
  x86/boot.c: In function ‘kvm__load_firmware’:
  x86/boot.c:29: error: format ‘%lu’ expects type ‘long unsigned int’, but
  argument 3 has type ‘__off64_t’
  make: *** [x86/boot.o] Erreur 1

Signed-off-by: Jean-Philippe Menil <jean-philippe.menil@univ-nantes.fr>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/x86/boot.c

index c434030f5b2e1222259e38e56d5179cffb9fa95f..93d96773e7da626ada61a1c202a7c8724aeafcdc 100644 (file)
@@ -26,7 +26,7 @@ bool kvm__load_firmware(struct kvm *kvm, const char *firmware_filename)
                return false;
 
        if (st.st_size > MB_FIRMWARE_BIOS_SIZE)
-               die("firmware image %s is too big to fit in memory (%lu KB).\n", firmware_filename, st.st_size / 1024);
+               die("firmware image %s is too big to fit in memory (%Lu KB).\n", firmware_filename, (u64)(st.st_size / 1024));
 
        p = guest_flat_to_host(kvm, MB_FIRMWARE_BIOS_BEGIN);