diff options
author | Glauber Costa <glommer@redhat.com> | 2009-07-15 01:34:57 -0400 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2009-07-21 17:06:47 -0300 |
commit | e2e3b6959d9550e1e5db8ca2d8cc0bdcded4e32d (patch) | |
tree | c3a5daba3d84d591353df7b3fdaa83f5c33187f6 /kvm-all.c | |
parent | reuse kvm_vm_ioctl (diff) | |
download | qemu-kvm-e2e3b6959d9550e1e5db8ca2d8cc0bdcded4e32d.tar.gz qemu-kvm-e2e3b6959d9550e1e5db8ca2d8cc0bdcded4e32d.tar.bz2 qemu-kvm-e2e3b6959d9550e1e5db8ca2d8cc0bdcded4e32d.zip |
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>
Diffstat (limited to 'kvm-all.c')
-rw-r--r-- | kvm-all.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -793,6 +793,7 @@ void kvm_set_phys_mem(target_phys_addr_t start_addr, } } +#endif int kvm_ioctl(KVMState *s, int type, ...) { int ret; @@ -809,7 +810,6 @@ int kvm_ioctl(KVMState *s, int type, ...) return ret; } -#endif int kvm_vm_ioctl(KVMState *s, int type, ...) { |