diff options
authorGlauber Costa <>2009-07-15 01:34:57 -0400
committerMarcelo Tosatti <>2009-07-21 17:06:47 -0300
commite2e3b6959d9550e1e5db8ca2d8cc0bdcded4e32d (patch)
treec3a5daba3d84d591353df7b3fdaa83f5c33187f6 /kvm-all.c
parentreuse kvm_vm_ioctl (diff)
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 <> 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 <>
Diffstat (limited to 'kvm-all.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 9373d991c..0ec6475a6 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -793,6 +793,7 @@ void kvm_set_phys_mem(target_phys_addr_t start_addr,
int kvm_ioctl(KVMState *s, int type, ...)
int ret;
@@ -809,7 +810,6 @@ int kvm_ioctl(KVMState *s, int type, ...)
return ret;
int kvm_vm_ioctl(KVMState *s, int type, ...)