]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: Fix 64-bit assumptions and type uglinesses
authorIngo Molnar <mingo@elte.hu>
Sat, 9 Apr 2011 11:21:24 +0000 (13:21 +0200)
committerPekka Enberg <penberg@kernel.org>
Sat, 9 Apr 2011 11:37:46 +0000 (14:37 +0300)
commit6ae8af2cb18a21a01852fb3324047b6a3800d6ce
tree11ef578ffe44c5ddaf1744045c59b16920d1bf11
parent48af1841823a96aa85a7b7c91324eebcf800b22f
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>
tools/kvm/include/linux/types.h
tools/kvm/kvm-run.c