reuse kvm_ioctl
commite2e3b6959d9550e1e5db8ca2d8cc0bdcded4e32d
authorGlauber Costa <glommer@redhat.com>
Wed, 15 Jul 2009 05:34:57 +0000 (15 01:34 -0400)
committerMarcelo Tosatti <mtosatti@redhat.com>
Tue, 21 Jul 2009 20:06:47 +0000 (21 17:06 -0300)
treec3a5daba3d84d591353df7b3fdaa83f5c33187f6
parentea906fb1e826a20ad4e576d713146d891b6d82d7
reuse kvm_ioctl

Start using kvm_ioctl's code.
For type safety, delete fd from kvm_context entirely, so the
compiler can play along with us helping to detect errors I might
have made.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Also, we were slightly different from qemu upstream in handling error
code from ioctl, since we were always testing for -1, while kvm_vm_ioctl
returns -errno. We already did this in most of the call sites, so
this patch has the big advantage of simplifying call sites.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
kvm-all.c
qemu-kvm-x86.c
qemu-kvm.c
qemu-kvm.h