kvm tools: Fix 64-bit assumptions and type uglinesses

Make the MIN_RAM_SIZE_MB constant 64-bit on 32-bit systems as well, otherwise
we get this build failure:

  kvm-run.c: In function ‘kvm_cmd_run’:
  kvm-run.c:119: error: format ‘%lu’ expects type ‘long unsigned int’, but argument 2 has type ‘u64’

Also adjust affected printf format string - this necessiates the use of
the sane Linux definition of u64 instead of the brain-dead int64_t
variant.

That also allows (and necessiates) the removal of the ugly PRIu64 format
string hackery. Friends don't let friends use PRI* hackeries! :-)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
Ingo Molnar
2015-06-01 16:39:42 +01:00
committed by Will Deacon
parent 5a6ac6752b
commit a2a002f91b
2 changed files with 7 additions and 8 deletions
+2 -2
View File
@@ -12,8 +12,8 @@
#define __s32 int32_t
#define __u32 uint32_t
#define __s64 int64_t
#define __u64 uint64_t
#define __s64 long long
#define __u64 unsigned long long
typedef __u64 u64;
typedef __s64 s64;