reuse kvm_vm_ioctl
commitea906fb1e826a20ad4e576d713146d891b6d82d7
authorGlauber Costa <glommer@redhat.com>
Wed, 15 Jul 2009 05:31:23 +0000 (15 01:31 -0400)
committerMarcelo Tosatti <mtosatti@redhat.com>
Tue, 21 Jul 2009 19:58:33 +0000 (21 16:58 -0300)
tree283234e5b3cda456afa1eb4b0a751f509b71e8dd
parente35100e3f358b473c9942f7d336b8a9d814859bf
reuse kvm_vm_ioctl

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

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.

Diffstat says:
 4 files changed, 58 insertions(+), 134 deletions(-)

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
kvm-all.c
qemu-kvm-x86.c
qemu-kvm.c
qemu-kvm.h